|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.engine.DbObjectBase
org.h2.schema.SchemaObjectBase
org.h2.schema.Sequence
public class Sequence
A sequence is created using the statement CREATE SEQUENCE
Field Summary | |
---|---|
static int |
DEFAULT_CACHE_SIZE
The default cache size for sequences. |
Fields inherited from class org.h2.engine.DbObjectBase |
---|
comment, database, trace |
Fields inherited from interface org.h2.engine.DbObject |
---|
AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE |
Constructor Summary | |
---|---|
Sequence(Schema schema,
int id,
java.lang.String name,
boolean belongsToTable)
|
Method Summary | |
---|---|
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()
|
java.lang.String |
getCreateSQL()
Build a SQL statement to re-create this object. |
java.lang.String |
getCreateSQLForCopy(Table table,
java.lang.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()
|
java.lang.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)
|
Methods inherited from class org.h2.schema.SchemaObjectBase |
---|
getSchema, getSQL, initSchemaObjectBase, isHidden |
Methods inherited from class org.h2.engine.DbObjectBase |
---|
getChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, rename, setComment, setModified, setObjectName, setTemporary, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.h2.engine.DbObject |
---|
getChildren, getComment, getDatabase, getId, getModificationId, getName, isTemporary, rename, setComment, setModified, setTemporary |
Field Detail |
---|
public static final int DEFAULT_CACHE_SIZE
Constructor Detail |
---|
public Sequence(Schema schema, int id, java.lang.String name, boolean belongsToTable)
Method Detail |
---|
public void setStartValue(long value)
public boolean getBelongsToTable()
public long getIncrement()
public void setIncrement(long inc)
public java.lang.String getDropSQL()
DbObjectBase
getDropSQL
in interface DbObject
getDropSQL
in class DbObjectBase
public java.lang.String getCreateSQLForCopy(Table table, java.lang.String quotedName)
DbObjectBase
getCreateSQLForCopy
in interface DbObject
getCreateSQLForCopy
in class DbObjectBase
table
- the new table namequotedName
- the new quoted name
public java.lang.String getCreateSQL()
DbObjectBase
getCreateSQL
in interface DbObject
getCreateSQL
in class DbObjectBase
public long getNext(Session session)
session
- the session
public void flushWithoutMargin()
public void flush(Session session)
session
- the sessionpublic void close()
public int getType()
DbObjectBase
getType
in interface DbObject
getType
in class DbObjectBase
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |