Represents a database sequence.
| Method from org.apache.openjpa.jdbc.schema.Sequence Detail: |
public int compareTo(Object other) {
String name = getFullName();
String otherName = ((Sequence) other).getFullName();
if (name == null && otherName == null)
return 0;
if (name == null)
return 1;
if (otherName == null)
return -1;
return name.compareTo(otherName);
}
|
public int getAllocate() {
return _cache;
}
The sequence's cache size. |
public String getFullName() {
if (_fullName == null) {
Schema schema = getSchema();
if (schema == null || schema.getName() == null)
_fullName = getName();
else
_fullName = schema.getName() + "." + getName();
}
return _fullName;
}
Return the sequence name, including schema, using '.' as the
catalog separator. |
public int getIncrement() {
return _increment;
}
The sequence's increment. |
public int getInitialValue() {
return _initial;
}
The sequence's initial value. |
public String getName() {
return _name;
}
Return the name of the sequence. |
public String getResourceName() {
return getFullName();
}
|
public Schema getSchema() {
return _schema;
}
Return the schema for the sequence. |
public String getSchemaName() {
return _schemaName;
}
The sequence's schema name. |
public File getSourceFile() {
return _source;
}
|
public Object getSourceScope() {
return null;
}
|
public int getSourceType() {
return _srcType;
}
|
void remove() {
_schema = null;
_fullName = null;
}
Called when the sequence is removed from its schema. |
public void setAllocate(int cache) {
_cache = cache;
}
The sequence's cache size. |
public void setIncrement(int increment) {
_increment = increment;
}
The sequence's increment. |
public void setInitialValue(int initial) {
_initial = initial;
}
The sequence's initial value. |
public void setName(String name) {
if (getSchema() != null)
throw new IllegalStateException();
_name = name;
_fullName = null;
}
Set the name of the sequence. This method can only be called on
sequences that are not part of a schema. |
public void setSchemaName(String name) {
if (getSchema() != null)
throw new IllegalStateException();
_schemaName = name;
_fullName = null;
}
The sequence's schema name. You can only call this method on sequences
whose schema object is not set. |
public void setSource(File source,
int srcType) {
_source = source;
_srcType = srcType;
}
|
public String toString() {
return getFullName();
}
|