JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.persistence
Class PostgresStorage

java.lang.Object
  |
  +--org.objectweb.jac.aspects.persistence.SQLStorage
        |
        +--org.objectweb.jac.aspects.persistence.PostgresStorage
All Implemented Interfaces:
Serializable, Storage

public class PostgresStorage
extends SQLStorage

Implements the storage to store within a PostgreSQL database.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.objectweb.jac.aspects.persistence.SQLStorage
SQLStorage.InvalidStorageException
 
Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.persistence.SQLStorage
db
 
Constructor Summary
PostgresStorage(String database, String user, String password)
          Creates a new storage for a PostgreSQL database.
 
Method Summary
 long getNextVal(String sequence)
          Returns the next value of a sequence
 String newName(String className)
          Generate a new name for an instance.
 
Methods inherited from class org.objectweb.jac.aspects.persistence.SQLStorage
addSlashes, addToList, addToList, addToSet, bindOIDToName, checkStorage, clearList, clearMap, clearSet, close, collectionContains, commit, createObject, deleteName, deleteObject, execute, executeQuery, executeUpdate, getClassID, getCollectionID, getCollectionValues, getField, getFields, getFromMap, getIndexInList, getInternalIndexInList, getLastIndexInList, getList, getList, getListItem, getListSize, getLong, getMap, getMap, getMapSize, getNameFromOID, getObjects, getObjects, getOID, getOIDFromName, getRootObjects, getSet, getSet, getSetSize, listContains, mapContainsKey, mapContainsValue, putInMap, removeField, removeFromList, removeFromList, removeFromMap, removeFromSet, rollback, setConnection, setContains, setField, setListItem, startTransaction, updateField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresStorage

public PostgresStorage(String database,
                       String user,
                       String password)
                throws SQLException
Creates a new storage for a PostgreSQL database.

Parameters:
database - the database. It may take on eof the following form:
user - the user name
password - the password for this user
Method Detail

getNextVal

public long getNextVal(String sequence)
                throws Exception
Description copied from class: SQLStorage
Returns the next value of a sequence

Specified by:
getNextVal in class SQLStorage
Exception

newName

public String newName(String className)
               throws Exception
Description copied from interface: Storage
Generate a new name for an instance.

Specified by:
newName in interface Storage
Overrides:
newName in class SQLStorage
Parameters:
className - the className of the instance for which to generate a name
Returns:
the generated name, null if failure
Exception

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli