public class Sequence extends SchemaObjectBase
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CACHE_SIZE
The default cache size for sequences.
|
comment, database, trace
AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE
Constructor and Description |
---|
Sequence(Schema schema,
int id,
String name,
boolean belongsToTable) |
Modifier and Type | Method and Description |
---|---|
void |
checkRename()
Check if this object can be renamed.
|
void |
close()
Flush the current value to disk and close this object.
|
void |
flush(Session session)
Flush the current value, including the margin, to disk.
|
void |
flushWithoutMargin()
Flush the current value to disk.
|
boolean |
getBelongsToTable() |
long |
getCacheSize() |
String |
getCreateSQL()
Build a SQL statement to re-create this object.
|
String |
getCreateSQLForCopy(Table table,
String quotedName)
Build a SQL statement to re-create the object, or to create a copy of the
object with a different name or referencing a different table
|
long |
getCurrentValue() |
String |
getDropSQL()
Build a SQL statement to drop this object.
|
long |
getIncrement() |
long |
getNext(Session session)
Get the next value for this sequence.
|
int |
getType()
Get the object type.
|
void |
removeChildrenAndResources(Session session)
Remove all dependent objects and free all resources (files, blocks in
files) of this object.
|
void |
setBelongsToTable(boolean b) |
void |
setCacheSize(long cacheSize) |
void |
setIncrement(long inc) |
void |
setStartValue(long value) |
getSchema, getSQL, initSchemaObjectBase, isHidden
getChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, rename, setComment, setModified, setObjectName, setTemporary, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChildren, getComment, getDatabase, getId, getName, isTemporary, rename, setComment, setTemporary
public static final int DEFAULT_CACHE_SIZE
public void setStartValue(long value)
public boolean getBelongsToTable()
public long getIncrement()
public void setIncrement(long inc)
public String getDropSQL()
DbObjectBase
getDropSQL
in interface DbObject
getDropSQL
in class DbObjectBase
public String getCreateSQLForCopy(Table table, String quotedName)
DbObject
table
- the new tablequotedName
- the quoted namepublic String getCreateSQL()
DbObjectBase
getCreateSQL
in interface DbObject
getCreateSQL
in class DbObjectBase
public long getNext(Session session)
session
- the sessionpublic void flushWithoutMargin()
public void flush(Session session)
session
- the sessionpublic void close()
public int getType()
DbObject
public void removeChildrenAndResources(Session session)
DbObjectBase
removeChildrenAndResources
in interface DbObject
removeChildrenAndResources
in class DbObjectBase
session
- the sessionpublic void checkRename()
DbObjectBase
checkRename
in interface DbObject
checkRename
in class DbObjectBase
public long getCurrentValue()
public void setBelongsToTable(boolean b)
public void setCacheSize(long cacheSize)
public long getCacheSize()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.