|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.meta.SequenceMetaData
public class SequenceMetaData
Metadata about a named sequence.
Nested Class Summary | |
---|---|
static interface |
SequenceMetaData.SequenceFactory
Allow facades to supply adapters from a spec sequence type to the OpenJPA sequence type. |
Field Summary | |
---|---|
static String |
IMPL_NATIVE
Default plugin alias name; every back end should have some 'native' sequence implementation. |
static String |
IMPL_TIME
Time-based sequence values. |
static String |
NAME_SYSTEM
Sequence name that means to use the system default sequence. |
Fields inherited from interface org.apache.openjpa.lib.meta.SourceTracker |
---|
SRC_ANNOTATIONS, SRC_OTHER, SRC_XML |
Fields inherited from interface org.apache.openjpa.lib.xml.Commentable |
---|
EMPTY_COMMENTS |
Constructor Summary | |
---|---|
SequenceMetaData(String name,
MetaDataRepository repos)
Constructor; supply sequence name. |
Method Summary | |
---|---|
protected void |
addStandardProperties(StringBuilder props)
Add standard properties to the given properties buffer. |
protected void |
appendProperty(StringBuilder props,
String name,
int val)
Add an int property to the buffer. |
protected void |
appendProperty(StringBuilder props,
String name,
String val)
Add a string property to the buffer. |
void |
close()
Close user sequence instance. |
int |
getAllocate()
Sequence values to allocate, or -1 for default. |
String |
getCatalog()
|
int |
getColNumber()
Return the column number in the line of the file at which this instance was parsed. |
String[] |
getComments()
Return comments, or empty array if none. |
int |
getIncrement()
Sequence increment, or -1 for default. |
int |
getInitialValue()
Initial sequence value, or -1 for default. |
Seq |
getInstance(ClassLoader envLoader)
Return the initialized sequence instance. |
int |
getLineNumber()
Return the line number of the file at which this instance was parsed. |
String |
getName()
The sequence name. |
MetaDataRepository |
getRepository()
The owning repository. |
String |
getResourceName()
Return the domain-meaningful name of the resource that was loaded from this source. |
String |
getSchema()
|
String |
getSequence()
Native sequence name. |
SequenceMetaData.SequenceFactory |
getSequenceFactory()
A factory to transform spec sequences produced by user factories into the OpenJPA sequence type. |
String |
getSequencePlugin()
Plugin string describing the Seq . |
File |
getSourceFile()
Return the file from which this instance was parsed. |
Object |
getSourceScope()
Return the domain-dependent scope of this instance within its file. |
int |
getSourceType()
Return the type of source. |
int |
getType()
The sequence type. |
protected Seq |
instantiate(ClassLoader envLoader)
Create a new uninitialized instance of this sequence. |
protected PluginValue |
newPluginValue(String property)
Create a new plugin value for sequences. |
void |
setAllocate(int allocate)
Sequence values to allocate, or -1 for default. |
void |
setCatalog(String catalog)
|
void |
setColNumber(int colNum)
|
void |
setComments(String[] comments)
Set comments. |
void |
setIncrement(int increment)
Sequence increment, or -1 for default. |
void |
setInitialValue(int initial)
Initial sequence value, or -1 for default. |
void |
setLineNumber(int lineNum)
|
void |
setSchema(String schema)
|
void |
setSequence(String sequence)
Native sequence name. |
void |
setSequenceFactory(SequenceMetaData.SequenceFactory factory)
A factory to transform spec sequences produced by user factories into the OpenJPA sequence type. |
void |
setSequencePlugin(String plugin)
Plugin string describing the Seq . |
void |
setSource(File file,
Object scope,
int srcType)
|
void |
setType(int type)
The sequence type. |
String |
toString()
|
protected String |
wrapValue(String value)
Wraps property values that may contain spaces or other special characters in double quotes so they are processed as a single valued argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NAME_SYSTEM
public static final String IMPL_NATIVE
public static final String IMPL_TIME
Constructor Detail |
---|
public SequenceMetaData(String name, MetaDataRepository repos)
Method Detail |
---|
public MetaDataRepository getRepository()
getRepository
in interface MetaDataContext
public String getName()
public File getSourceFile()
SourceTracker
getSourceFile
in interface SourceTracker
public Object getSourceScope()
SourceTracker
getSourceScope
in interface SourceTracker
public int getSourceType()
SourceTracker
getSourceType
in interface SourceTracker
public void setSource(File file, Object scope, int srcType)
public int getLineNumber()
SourceTracker
getLineNumber
in interface SourceTracker
public void setLineNumber(int lineNum)
public int getColNumber()
SourceTracker
getColNumber
in interface SourceTracker
public void setColNumber(int colNum)
public String getResourceName()
SourceTracker
getResourceName
in interface SourceTracker
public int getType()
public void setType(int type)
public String getSequence()
public void setSequence(String sequence)
public int getIncrement()
public void setIncrement(int increment)
public int getAllocate()
public void setAllocate(int allocate)
public int getInitialValue()
public void setInitialValue(int initial)
public String getSequencePlugin()
Seq
.
public void setSequencePlugin(String plugin)
Seq
.
public SequenceMetaData.SequenceFactory getSequenceFactory()
public void setSequenceFactory(SequenceMetaData.SequenceFactory factory)
public Seq getInstance(ClassLoader envLoader)
protected Seq instantiate(ClassLoader envLoader)
public void setSchema(String schema)
public String getSchema()
public void setCatalog(String catalog)
public String getCatalog()
protected PluginValue newPluginValue(String property)
SeqValue
by default.
protected void addStandardProperties(StringBuilder props)
protected String wrapValue(String value)
protected void appendProperty(StringBuilder props, String name, String val)
protected void appendProperty(StringBuilder props, String name, int val)
public void close()
close
in interface Closeable
public String toString()
toString
in class Object
public String[] getComments()
Commentable
getComments
in interface Commentable
public void setComments(String[] comments)
Commentable
setComments
in interface Commentable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |