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:
Serializable, SourceTracker, Closeable, Commentable, MetaDataContext

public class SequenceMapping
extends SequenceMetaData

Specialization of sequence metadata for ORM.

Author:
Abe White
See Also:
Serialized Form

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(DBIdentifier name, MappingRepository repos)
          Sequence names are a kernel object so DBIdentifiers must be converted to strings
SequenceMapping(String name, MappingRepository repos)
          Deprecated.  
 
Method Summary
protected  void addStandardProperties(StringBuilder 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()
          Deprecated.  
 DBIdentifier getPrimaryKeyColumnIdentifier()
           
 String getPrimaryKeyValue()
          Primary key value, if not auto-determined.
 String getSequenceColumn()
          Deprecated.  
 DBIdentifier getSequenceColumnIdentifier()
           
 String getTable()
          Deprecated.  
 DBIdentifier getTableIdentifier()
           
 String[] getUniqueColumns()
          Deprecated.  
 DBIdentifier[] getUniqueColumnsIdentifier()
           
 DBIdentifier getUniqueConstraintIdentifier()
           
 String getUniqueConstraintName()
          Deprecated.  
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)
          Deprecated.  
 void setPrimaryKeyColumnIdentifier(DBIdentifier primaryKeyColumn)
           
 void setPrimaryKeyValue(String primaryKeyValue)
          Primary key value, if not auto-determined.
 void setSequenceColumn(String sequenceColumn)
          Deprecated.  
 void setSequenceColumnIdentifier(DBIdentifier sequenceColumn)
           
 void setTable(String table)
          Deprecated.  
 void setTableIdentifier(DBIdentifier table)
           
 void setUniqueColumns(String[] cols)
          Deprecated.  
 void setUniqueColumnsIdentifier(DBIdentifier[] cols)
           
 void setUniqueConstraintIdentifier(DBIdentifier name)
           
 void setUniqueConstraintName(String name)
          Deprecated.  
 
Methods inherited from class org.apache.openjpa.meta.SequenceMetaData
appendProperty, appendProperty, close, getAllocate, getCatalog, getColNumber, getComments, getIncrement, getInitialValue, getInstance, getLineNumber, getName, getRepository, getResourceName, getSchema, getSequence, getSequenceFactory, getSequencePlugin, getSourceFile, getSourceScope, getSourceType, getType, instantiate, setAllocate, setCatalog, setColNumber, setComments, setIncrement, setInitialValue, setLineNumber, setSchema, setSequence, setSequenceFactory, setSequencePlugin, setSource, setType, toString, wrapValue
 
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)
Deprecated. 

Parameters:
name -
repos -

SequenceMapping

public SequenceMapping(DBIdentifier name,
                       MappingRepository repos)
Sequence names are a kernel object so DBIdentifiers must be converted to strings

Parameters:
name -
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()
Deprecated. 

Name of sequence table, if any.


getTableIdentifier

public DBIdentifier getTableIdentifier()

setTable

public void setTable(String table)
Deprecated. 

Name of sequence table, if any.


setTableIdentifier

public void setTableIdentifier(DBIdentifier table)

getSequenceColumn

public String getSequenceColumn()
Deprecated. 

Name of sequence column, if any.


getSequenceColumnIdentifier

public DBIdentifier getSequenceColumnIdentifier()

setSequenceColumn

public void setSequenceColumn(String sequenceColumn)
Deprecated. 

Name of sequence column, if any.


setSequenceColumnIdentifier

public void setSequenceColumnIdentifier(DBIdentifier sequenceColumn)

getPrimaryKeyColumn

public String getPrimaryKeyColumn()
Deprecated. 

Name of primary key column, if any.


getPrimaryKeyColumnIdentifier

public DBIdentifier getPrimaryKeyColumnIdentifier()

setPrimaryKeyColumn

public void setPrimaryKeyColumn(String primaryKeyColumn)
Deprecated. 

Name of primary key column, if any.


setPrimaryKeyColumnIdentifier

public void setPrimaryKeyColumnIdentifier(DBIdentifier primaryKeyColumn)

getPrimaryKeyValue

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


setPrimaryKeyValue

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


setUniqueColumns

public void setUniqueColumns(String[] cols)
Deprecated. 

Parameters:
cols -

setUniqueColumnsIdentifier

public void setUniqueColumnsIdentifier(DBIdentifier[] cols)

getUniqueColumns

public String[] getUniqueColumns()
Deprecated. 


getUniqueColumnsIdentifier

public DBIdentifier[] getUniqueColumnsIdentifier()

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(StringBuilder props)
Description copied from class: SequenceMetaData
Add standard properties to the given properties buffer.

Overrides:
addStandardProperties in class SequenceMetaData

setUniqueConstraintName

public void setUniqueConstraintName(String name)
Deprecated. 

Parameters:
name -

setUniqueConstraintIdentifier

public void setUniqueConstraintIdentifier(DBIdentifier name)

getUniqueConstraintName

public String getUniqueConstraintName()
Deprecated. 

Returns:

getUniqueConstraintIdentifier

public DBIdentifier getUniqueConstraintIdentifier()


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.