bill.util.persist
Class EntityDataFactoryConfig

java.lang.Object
  |
  +--bill.util.persist.EntityDataFactory
        |
        +--bill.util.persist.EntityDataFactoryConfig

public abstract class EntityDataFactoryConfig
extends EntityDataFactory

Factory for Config entities. The factory contains data and access methods specific to a Config persistence implementation. This includes logic to retrieve "sequence" numbers.


Field Summary
static String SECTION_SEQUENCE
           
 
Fields inherited from class bill.util.persist.EntityDataFactory
_connection
 
Constructor Summary
EntityDataFactoryConfig()
           
 
Method Summary
static PersistConfiguration getConfigConnection()
          Retrieve a persistance connection for our use in manipulating the database's data.
static long getNextSequence(String sequenceName)
          Gets the next sequence value for the specified sequence name.
 
Methods inherited from class bill.util.persist.EntityDataFactory
getConnection, setConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECTION_SEQUENCE

public static final String SECTION_SEQUENCE
Constructor Detail

EntityDataFactoryConfig

public EntityDataFactoryConfig()
Method Detail

getConfigConnection

public static PersistConfiguration getConfigConnection()
Retrieve a persistance connection for our use in manipulating the database's data. This is a convenient way of calling getConnection that returns us a PersistConfiguration rather than an Object, saving us from constantly typecasting.
Returns:
The persistance configuration object.

getNextSequence

public static long getNextSequence(String sequenceName)
Gets the next sequence value for the specified sequence name. This method is serialized to make sure we do not hand out the same sequence value to multiple callers. Sequences are stored in a "sequence" database table. After retrieving the next sequence value we increment the databases next sequence value.
Parameters:
sequenceName - The name of the sequence to retrieve.
Returns:
The retrieved sequence value.