org.apache.openjpa.jdbc.meta
Class SequenceMapping

java.lang.Object
  extended by org.apache.openjpa.meta.SequenceMetaData
      extended by org.apache.openjpa.jdbc.meta.SequenceMapping
All Implemented Interfaces:
SourceTracker, Closeable, Commentable, MetaDataContext

public class SequenceMapping
extends SequenceMetaData

Specialization of sequence metadata for ORM.

Author:
Abe White

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.openjpa.meta.SequenceMetaData
SequenceMetaData.SequenceFactory
 
Field Summary
static String IMPL_CLASS_TABLE
          ClassTableJDBCSeq alias.
static String IMPL_TABLE
          TableJDBCSeq alias.
static String IMPL_VALUE_TABLE
          ValueTableJDBCSeq alias.
 
Fields inherited from class org.apache.openjpa.meta.SequenceMetaData
IMPL_NATIVE, IMPL_TIME, NAME_SYSTEM
 
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
SequenceMapping(String name, MappingRepository repos)
           
 
Method Summary
protected  void addStandardProperties(StringBuffer props)
          Add standard properties to the given properties buffer.
 File getMappingFile()
          Allow sequence to have a mapping file separate from its metadata source file.
 String getPrimaryKeyColumn()
          Name of primary key column, if any.
 String getPrimaryKeyValue()
          Primary key value, if not auto-determined.
 String getSequenceColumn()
          Name of sequence column, if any.
 String getTable()
          Name of sequence table, if any.
protected  PluginValue newPluginValue(String property)
          Create a new plugin value for sequences.
 void setMappingFile(File file)
          Allow sequence to have a mapping file separate from its metadata source file.
 void setPrimaryKeyColumn(String primaryKeyColumn)
          Name of primary key column, if any.
 void setPrimaryKeyValue(String primaryKeyValue)
          Primary key value, if not auto-determined.
 void setSequenceColumn(String sequenceColumn)
          Name of sequence column, if any.
 void setTable(String table)
          Name of sequence table, if any.
 
Methods inherited from class org.apache.openjpa.meta.SequenceMetaData
appendProperty, appendProperty, close, getAllocate, getComments, getIncrement, getInitialValue, getInstance, getName, getRepository, getResourceName, getSequence, getSequenceFactory, getSequencePlugin, getSourceFile, getSourceScope, getSourceType, getType, instantiate, setAllocate, setComments, setIncrement, setInitialValue, setSequence, setSequenceFactory, setSequencePlugin, setSource, setType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IMPL_VALUE_TABLE

public static final String IMPL_VALUE_TABLE
ValueTableJDBCSeq alias.

See Also:
Constant Field Values

IMPL_TABLE

public static final String IMPL_TABLE
TableJDBCSeq alias.

See Also:
Constant Field Values

IMPL_CLASS_TABLE

public static final String IMPL_CLASS_TABLE
ClassTableJDBCSeq alias.

See Also:
Constant Field Values
Constructor Detail

SequenceMapping

public SequenceMapping(String name,
                       MappingRepository repos)
Method Detail

getMappingFile

public File getMappingFile()
Allow sequence to have a mapping file separate from its metadata source file.


setMappingFile

public void setMappingFile(File file)
Allow sequence to have a mapping file separate from its metadata source file.


getTable

public String getTable()
Name of sequence table, if any.


setTable

public void setTable(String table)
Name of sequence table, if any.


getSequenceColumn

public String getSequenceColumn()
Name of sequence column, if any.


setSequenceColumn

public void setSequenceColumn(String sequenceColumn)
Name of sequence column, if any.


getPrimaryKeyColumn

public String getPrimaryKeyColumn()
Name of primary key column, if any.


setPrimaryKeyColumn

public void setPrimaryKeyColumn(String primaryKeyColumn)
Name of primary key column, if any.


getPrimaryKeyValue

public String getPrimaryKeyValue()
Primary key value, if not auto-determined.


setPrimaryKeyValue

public void setPrimaryKeyValue(String primaryKeyValue)
Primary key value, if not auto-determined.


newPluginValue

protected PluginValue newPluginValue(String property)
Description copied from class: SequenceMetaData
Create a new plugin value for sequences. Returns a standard SeqValue by default.

Overrides:
newPluginValue in class SequenceMetaData

addStandardProperties

protected void addStandardProperties(StringBuffer props)
Description copied from class: SequenceMetaData
Add standard properties to the given properties buffer.

Overrides:
addStandardProperties in class SequenceMetaData


Copyright © 2006 Apache Software Foundation. All Rights Reserved.