| 1 | |
package liquibase.statement.core; |
| 2 | |
|
| 3 | |
import liquibase.statement.AbstractSqlStatement; |
| 4 | |
|
| 5 | |
import java.math.BigInteger; |
| 6 | |
|
| 7 | |
public class CreateSequenceStatement extends AbstractSqlStatement { |
| 8 | |
|
| 9 | |
private String schemaName; |
| 10 | |
private String sequenceName; |
| 11 | |
private BigInteger startValue; |
| 12 | |
private BigInteger incrementBy; |
| 13 | |
private BigInteger maxValue; |
| 14 | |
private BigInteger minValue; |
| 15 | |
private Boolean ordered; |
| 16 | |
private Boolean cycle; |
| 17 | |
|
| 18 | 48 | public CreateSequenceStatement(String schemaName, String sequenceName) { |
| 19 | 48 | this.schemaName = schemaName; |
| 20 | 48 | this.sequenceName = sequenceName; |
| 21 | 48 | } |
| 22 | |
|
| 23 | |
@Override |
| 24 | |
public boolean skipOnUnsupported() { |
| 25 | 1 | return true; |
| 26 | |
} |
| 27 | |
|
| 28 | |
public String getSchemaName() { |
| 29 | 0 | return schemaName; |
| 30 | |
} |
| 31 | |
|
| 32 | |
public String getSequenceName() { |
| 33 | 11 | return sequenceName; |
| 34 | |
} |
| 35 | |
|
| 36 | |
public BigInteger getStartValue() { |
| 37 | 11 | return startValue; |
| 38 | |
} |
| 39 | |
|
| 40 | |
public CreateSequenceStatement setStartValue(BigInteger startValue) { |
| 41 | 43 | this.startValue = startValue; |
| 42 | 43 | return this; |
| 43 | |
} |
| 44 | |
|
| 45 | |
public BigInteger getIncrementBy() { |
| 46 | 11 | return incrementBy; |
| 47 | |
} |
| 48 | |
|
| 49 | |
public CreateSequenceStatement setIncrementBy(BigInteger incrementBy) { |
| 50 | 43 | this.incrementBy = incrementBy; |
| 51 | 43 | return this; |
| 52 | |
} |
| 53 | |
|
| 54 | |
public BigInteger getMaxValue() { |
| 55 | 11 | return maxValue; |
| 56 | |
} |
| 57 | |
|
| 58 | |
public CreateSequenceStatement setMaxValue(BigInteger maxValue) { |
| 59 | 43 | this.maxValue = maxValue; |
| 60 | 43 | return this; |
| 61 | |
} |
| 62 | |
|
| 63 | |
public BigInteger getMinValue() { |
| 64 | 11 | return minValue; |
| 65 | |
} |
| 66 | |
|
| 67 | |
public CreateSequenceStatement setMinValue(BigInteger minValue) { |
| 68 | 43 | this.minValue = minValue; |
| 69 | 43 | return this; |
| 70 | |
} |
| 71 | |
|
| 72 | |
public Boolean getOrdered() { |
| 73 | 11 | return ordered; |
| 74 | |
} |
| 75 | |
|
| 76 | |
public CreateSequenceStatement setOrdered(Boolean ordered) { |
| 77 | 43 | this.ordered = ordered; |
| 78 | 43 | return this; |
| 79 | |
} |
| 80 | |
|
| 81 | |
public Boolean getCycle() { |
| 82 | 0 | return cycle; |
| 83 | |
} |
| 84 | |
|
| 85 | |
public CreateSequenceStatement setCycle(Boolean cycle) { |
| 86 | 43 | this.cycle = cycle; |
| 87 | 43 | return this; |
| 88 | |
} |
| 89 | |
} |