Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.jdbc » kernel » [javadoc | source]
org.apache.openjpa.jdbc.kernel
public class: ValueTableJDBCSeq [javadoc | source]
java.lang.Object
   org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq
      org.apache.openjpa.jdbc.kernel.TableJDBCSeq
         org.apache.openjpa.jdbc.kernel.ValueTableJDBCSeq

All Implemented Interfaces:
    Configurable, JDBCSeq

Specialization of the TableJDBCSeq that maintains multiple sequence counts. Each instance of this class represents one row with a known string primary key value, more or less. The table name defaults to OPENJPA_SEQUENCES_TABLE.
Field Summary
public static final  String PK_VALUE     
Fields inherited from org.apache.openjpa.jdbc.kernel.TableJDBCSeq:
ACTION_DROP,  ACTION_ADD,  ACTION_GET,  ACTION_SET
Fields inherited from org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq:
type,  current
Constructor:
 public ValueTableJDBCSeq() 
Method from org.apache.openjpa.jdbc.kernel.ValueTableJDBCSeq Summary:
addPrimaryKeyColumn,   getPrimaryKey,   getPrimaryKeyValue,   main,   run,   run,   setPrimaryKeyValue
Methods from org.apache.openjpa.jdbc.kernel.TableJDBCSeq:
addPrimaryKeyColumn,   addSchema,   allocateInternal,   currentInternal,   dropTable,   endConfiguration,   executeQuery,   executeUpdate,   getAllocate,   getConfiguration,   getInitialValue,   getPrimaryKey,   getPrimaryKeyColumn,   getSequence,   getSequence,   getSequenceColumn,   getStatus,   getTable,   main,   nextInternal,   prepareStatement,   refreshTable,   resolveTableName,   run,   run,   setAllocate,   setConfiguration,   setIncrement,   setInitialValue,   setPrimaryKeyColumn,   setSequence,   setSequenceColumn,   setTable,   setTableName,   startConfiguration
Methods from org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq:
addSchema,   allocate,   allocateInternal,   close,   closeConnection,   current,   currentInternal,   getConfiguration,   getConnection,   next,   nextInternal,   setType,   suspendInJTA
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.jdbc.kernel.ValueTableJDBCSeq Detail:
 protected Column addPrimaryKeyColumn(Table table) 
 protected Object getPrimaryKey(ClassMapping mapping) 
 public String getPrimaryKeyValue() 
    The primary key value for this row. Defaults to DEFAULT.
 public static  void main(String[] args) throws Exception 
    Usage: java org.apache.openjpa.jdbc.kernel.ValueTableJDBCSeq [option]* -action/-a <add | drop | get | set> [primary key value] [value] Where the following options are recognized.
    • -properties/-p <properties file or resource>: The path or resource name of a OpenJPA properties file containing information such as the license key and connection data as outlined in JDBCConfiguration . Optional.
    • -<property name> <property value>: All bean properties of the OpenJPA JDBCConfiguration can be set by using their names and supplying a value. For example: -licenseKey adslfja83r3lkadf
    The various actions are as follows.
    • add: Create the sequence table.
    • drop: Drop the sequence table.
    • get: Print the current sequence value for the given primary key value.
    • set: Set the sequence value for the given primary key value.
 public static boolean run(JDBCConfiguration conf,
    String[] args,
    Options opts) throws Exception 
    Run the tool. Returns false if invalid options were given.
 public static boolean run(JDBCConfiguration conf,
    String[] args,
    String action,
    MappingRepository repos,
    ClassLoader loader) throws Exception 
    Run the tool. Return false if an invalid option was given.
 public  void setPrimaryKeyValue(String value) 
    The primary key value for this row. Defaults to DEFAULT.