001package gudusoft.gsqlparser.nodes.hive; 002/* 003 * Date: 13-8-7 004 */ 005 006import gudusoft.gsqlparser.TSourceToken; 007import gudusoft.gsqlparser.nodes.TObjectName; 008import gudusoft.gsqlparser.nodes.TPTNodeList; 009import gudusoft.gsqlparser.nodes.TParseTreeNode; 010import gudusoft.gsqlparser.nodes.TParseTreeVisitor; 011 012public class THiveRowFormat extends TParseTreeNode { 013 public enum ERowFormatType {serde,delimited}; 014 015 private ERowFormatType rowFormatType; 016 017 public void setRowFormatType(ERowFormatType rowFormatType) { 018 this.rowFormatType = rowFormatType; 019 } 020 021 public ERowFormatType getRowFormatType() { 022 023 return rowFormatType; 024 } 025 026 private THiveTerminatedIdentifier tableRowFormatFieldIdentifier; 027 private THiveTerminatedIdentifier tableRowFormatCollItemsIdentifier; 028 private THiveTerminatedIdentifier tableRowFormatMapKeysIdentifier; 029 private THiveTerminatedIdentifier tableRowFormatLinesIdentifier; 030 031 private TPTNodeList <THiveKeyValueProperty> tableProperties; 032 private TObjectName rowFormatName; 033 034 public TPTNodeList<THiveKeyValueProperty> getTableProperties() { 035 return tableProperties; 036 } 037 038 039 public TObjectName getRowFormatName() { 040 return rowFormatName; 041 } 042 043 public void init(Object arg1){ 044 rowFormatName = (TObjectName)arg1; 045 } 046 047 public void init(Object arg1,Object arg2){ 048 init(arg1); 049 tableProperties = (TPTNodeList)arg2; 050 } 051 052 053 public THiveTerminatedIdentifier getTableRowFormatCollItemsIdentifier() { 054 return tableRowFormatCollItemsIdentifier; 055 } 056 057 public THiveTerminatedIdentifier getTableRowFormatFieldIdentifier() { 058 return tableRowFormatFieldIdentifier; 059 } 060 061 public THiveTerminatedIdentifier getTableRowFormatLinesIdentifier() { 062 return tableRowFormatLinesIdentifier; 063 } 064 065 public THiveTerminatedIdentifier getTableRowFormatMapKeysIdentifier() { 066 return tableRowFormatMapKeysIdentifier; 067 } 068 069 public void init(Object arg1, Object arg2, Object arg3, Object arg4){ 070 tableRowFormatFieldIdentifier = (THiveTerminatedIdentifier)arg1; 071 tableRowFormatCollItemsIdentifier = (THiveTerminatedIdentifier)arg2; 072 tableRowFormatMapKeysIdentifier = (THiveTerminatedIdentifier)arg3; 073 tableRowFormatLinesIdentifier = (THiveTerminatedIdentifier)arg4; 074 } 075 public void accept(TParseTreeVisitor v){ 076 v.preVisit(this); 077 v.postVisit(this); 078 } 079 080 public void acceptChildren(TParseTreeVisitor v){ 081 v.preVisit(this); 082 v.postVisit(this); 083 } 084}