Package org.apache.openjpa.jdbc.schema
Class Sequence
- java.lang.Object
-
- org.apache.openjpa.jdbc.schema.Sequence
-
- All Implemented Interfaces:
Serializable,Comparable<Sequence>,SourceTracker
public class Sequence extends Object implements Comparable<Sequence>, SourceTracker
Represents a database sequence.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(Sequence other)voidderef()intgetAllocate()The sequence's cache size.intgetColNumber()Return the column number in the line of the file at which this instance was parsed.DBIdentifiergetFullIdentifier()StringgetFullName()Deprecated.DBIdentifiergetIdentifier()intgetIncrement()The sequence's increment.intgetInitialValue()The sequence's initial value.intgetLineNumber()Return the line number of the file at which this instance was parsed.StringgetName()Deprecated.QualifiedDBIdentifiergetQualifiedPath()intgetRefCount()StringgetResourceName()Return the domain-meaningful name of the resource that was loaded from this source.SchemagetSchema()Return the schema for the sequence.DBIdentifiergetSchemaIdentifier()StringgetSchemaName()The sequence's schema name.FilegetSourceFile()Return the file from which this instance was parsed.ObjectgetSourceScope()Return the domain-dependent scope of this instance within its file.intgetSourceType()Return the type of source.voidref()voidsetAllocate(int cache)The sequence's cache size.voidsetColNumber(int colNum)voidsetIdentifier(DBIdentifier name)voidsetIncrement(int increment)The sequence's increment.voidsetInitialValue(int initial)The sequence's initial value.voidsetLineNumber(int lineNum)voidsetName(String name)Deprecated.voidsetSchemaIdentifier(DBIdentifier name)voidsetSchemaName(String name)Deprecated.voidsetSource(File source, int srcType)StringtoString()
-
-
-
Constructor Detail
-
Sequence
public Sequence()
Default constructor.
-
Sequence
@Deprecated public Sequence(String name, Schema schema)
Deprecated.Constructor.- Parameters:
name- the sequence nameschema- the sequence schema
-
Sequence
public Sequence(DBIdentifier name, Schema schema)
-
-
Method Detail
-
getSchema
public Schema getSchema()
Return the schema for the sequence.
-
getSchemaName
public String getSchemaName()
The sequence's schema name.
-
getSchemaIdentifier
public DBIdentifier getSchemaIdentifier()
-
setSchemaName
@Deprecated public void setSchemaName(String name)
Deprecated.The sequence's schema name. You can only call this method on sequences whose schema object is not set.
-
setSchemaIdentifier
public void setSchemaIdentifier(DBIdentifier name)
-
getName
@Deprecated public String getName()
Deprecated.Return the name of the sequence.
-
getIdentifier
public DBIdentifier getIdentifier()
-
setName
@Deprecated public void setName(String name)
Deprecated.Set the name of the sequence. This method can only be called on sequences that are not part of a schema.
-
setIdentifier
public void setIdentifier(DBIdentifier name)
-
getFullName
@Deprecated public String getFullName()
Deprecated.Return the sequence name, including schema, using '.' as the catalog separator.
-
getFullIdentifier
public DBIdentifier getFullIdentifier()
-
getQualifiedPath
public QualifiedDBIdentifier 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
public File getSourceFile()
Description copied from interface:SourceTrackerReturn the file from which this instance was parsed.- Specified by:
getSourceFilein interfaceSourceTracker
-
getSourceScope
public Object getSourceScope()
Description copied from interface:SourceTrackerReturn the domain-dependent scope of this instance within its file.- Specified by:
getSourceScopein interfaceSourceTracker
-
getSourceType
public int getSourceType()
Description copied from interface:SourceTrackerReturn the type of source.- Specified by:
getSourceTypein interfaceSourceTracker
-
setSource
public void setSource(File source, int srcType)
-
getResourceName
public String getResourceName()
Description copied from interface:SourceTrackerReturn 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:
getResourceNamein interfaceSourceTracker
-
compareTo
public int compareTo(Sequence other)
- Specified by:
compareToin interfaceComparable<Sequence>
-
getLineNumber
public int getLineNumber()
Description copied from interface:SourceTrackerReturn the line number of the file at which this instance was parsed.- Specified by:
getLineNumberin interfaceSourceTracker
-
setLineNumber
public void setLineNumber(int lineNum)
-
getColNumber
public int getColNumber()
Description copied from interface:SourceTrackerReturn the column number in the line of the file at which this instance was parsed.- Specified by:
getColNumberin interfaceSourceTracker
-
setColNumber
public void setColNumber(int colNum)
-
getRefCount
public int getRefCount()
-
ref
public void ref()
-
deref
public void deref()
-
-