001package gudusoft.gsqlparser.nodes;
002/*
003 * Date: 13-10-21
004 */
005
006import gudusoft.gsqlparser.ESequenceOptionType;
007
008public class TSequenceOption extends TParseTreeNode {
009    private ESequenceOptionType sequenceOptionType;
010    private TConstant optionValue;
011
012    private TObjectName ownedBy;
013
014    public TObjectName getOwnedBy() {
015        return ownedBy;
016    }
017
018    public void init(Object arg1){
019        sequenceOptionType = (ESequenceOptionType)arg1;
020    }
021
022    public TConstant getOptionValue() {
023        return optionValue;
024    }
025
026    public ESequenceOptionType getSequenceOptionType() {
027        return sequenceOptionType;
028    }
029
030    public void init(Object arg1,Object arg2){
031        init(arg1);
032        switch (this.sequenceOptionType){
033            case ownedBy:
034                this.ownedBy = (TObjectName) arg2;
035                break;
036            default:
037                optionValue = (TConstant)arg2;
038
039        }
040    }
041
042    public void setSequenceOptionType(ESequenceOptionType sequenceOptionType) {
043        this.sequenceOptionType = sequenceOptionType;
044    }
045
046    public void setOptionValue(TConstant optionValue) {
047        this.optionValue = optionValue;
048    }
049
050    public void accept(TParseTreeVisitor v){
051        v.preVisit(this);
052        v.postVisit(this);
053    }
054
055    public void acceptChildren(TParseTreeVisitor v) {
056        v.preVisit(this);
057        v.postVisit(this);
058    }
059}