Package org.apache.openjpa.jdbc.schema
Class Sequence
java.lang.Object
org.apache.openjpa.jdbc.schema.Sequence
- All Implemented Interfaces:
Serializable
,Comparable<Sequence>
,SourceTracker
Represents a database sequence.
- Author:
- Abe White
- See Also:
-
Field Summary
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
deref()
int
The sequence's cache size.int
Return the column number in the line of the file at which this instance was parsed.Deprecated.int
The sequence's increment.int
The sequence's initial value.int
Return the line number of the file at which this instance was parsed.getName()
Deprecated.int
Return the domain-meaningful name of the resource that was loaded from this source.Return the schema for the sequence.The sequence's schema name.Return the file from which this instance was parsed.Return the domain-dependent scope of this instance within its file.int
Return the type of source.void
ref()
void
setAllocate
(int cache) The sequence's cache size.void
setColNumber
(int colNum) void
setIdentifier
(DBIdentifier name) void
setIncrement
(int increment) The sequence's increment.void
setInitialValue
(int initial) The sequence's initial value.void
setLineNumber
(int lineNum) void
Deprecated.void
void
setSchemaName
(String name) Deprecated.void
toString()
-
Constructor Details
-
Sequence
public Sequence()Default constructor. -
Sequence
Deprecated.Constructor.- Parameters:
name
- the sequence nameschema
- the sequence schema
-
Sequence
-
-
Method Details
-
getSchema
Return the schema for the sequence. -
getSchemaName
The sequence's schema name. -
getSchemaIdentifier
-
setSchemaName
Deprecated.The sequence's schema name. You can only call this method on sequences whose schema object is not set. -
setSchemaIdentifier
-
getName
Deprecated.Return the name of the sequence. -
getIdentifier
-
setName
Deprecated.Set the name of the sequence. This method can only be called on sequences that are not part of a schema. -
setIdentifier
-
getFullName
Deprecated.Return the sequence name, including schema, using '.' as the catalog separator. -
getFullIdentifier
-
getQualifiedPath
-
getInitialValue
public int getInitialValue()The sequence's initial value. -
setInitialValue
public void setInitialValue(int initial) The sequence's initial value. -
getIncrement
public int getIncrement()The sequence's increment. -
setIncrement
public void setIncrement(int increment) The sequence's increment. -
getAllocate
public int getAllocate()The sequence's cache size. -
setAllocate
public void setAllocate(int cache) The sequence's cache size. -
getSourceFile
Description copied from interface:SourceTracker
Return the file from which this instance was parsed.- Specified by:
getSourceFile
in interfaceSourceTracker
-
getSourceScope
Description copied from interface:SourceTracker
Return the domain-dependent scope of this instance within its file.- Specified by:
getSourceScope
in interfaceSourceTracker
-
getSourceType
public int getSourceType()Description copied from interface:SourceTracker
Return the type of source.- Specified by:
getSourceType
in interfaceSourceTracker
-
setSource
-
getResourceName
Description copied from interface:SourceTracker
Return the domain-meaningful name of the resource that was loaded from this source. I.e., if we had loaded the source for a Java class, this would return the name of the class.- Specified by:
getResourceName
in interfaceSourceTracker
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Sequence>
-
toString
-
getLineNumber
public int getLineNumber()Description copied from interface:SourceTracker
Return the line number of the file at which this instance was parsed.- Specified by:
getLineNumber
in interfaceSourceTracker
-
setLineNumber
public void setLineNumber(int lineNum) -
getColNumber
public int getColNumber()Description copied from interface:SourceTracker
Return the column number in the line of the file at which this instance was parsed.- Specified by:
getColNumber
in interfaceSourceTracker
-
setColNumber
public void setColNumber(int colNum) -
getRefCount
public int getRefCount() -
ref
public void ref() -
deref
public void deref()
-