FileDocCategorySizeDatePackage
PersistenceManagerFactory.javaAPI DocGlassfish v2 API14284Fri May 04 22:34:56 BST 2007com.sun.jdo.api.persistence.support

PersistenceManagerFactory

public interface PersistenceManagerFactory implements Serializable
author
Craig Russell
version
0.1

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetConnectionDriverName()
Returns JDBC driver name

return
driver name

public java.lang.ObjectgetConnectionFactory()
Returns Connection Factory object that can be one of ConnectionFactory or javax.sql.DataSource

return
Connection Factory as java.lang.Object

public java.lang.StringgetConnectionFactoryName()
Returns ConnectionFactory name

return
ConnectionFactoryName

public java.io.PrintWritergetConnectionLogWriter()
Returns the LogWriter to which messages should be sent

return
LogWriter

public intgetConnectionLoginTimeout()
Returns the number of seconds to wait for a new connection to be established to the data source

return
wait time in seconds

public intgetConnectionMaxPool()
Returns maximum number of connections in the connection pool

return
connectionMaxPool

public intgetConnectionMinPool()
Returns minimum number of connections in the connection pool

return
connectionMinPool

public intgetConnectionMsInterval()
Returns the amount of time, in milliseconds, between the connection manager's attempts to get a pooled connection.

return
the length of the interval between tries in milliseconds

public intgetConnectionMsWait()
Returns the number of milliseconds to wait for an available connection from the connection pool before throwing an exception

return
number in milliseconds

public intgetConnectionTransactionIsolation()
Returns current transaction isolation level for connections of this PersistenceManagerFactory.

return
the current transaction isolation mode value as java.sql.Connection.TRANSACTION_*

public java.lang.StringgetConnectionURL()
Returns connection URL

return
connection URL

public java.lang.StringgetConnectionUserName()
Returns database user name

return
current database user name

public java.lang.StringgetIdentifier()
Gets Identifier. An Identifier is a string that user can use to identify the PersistenceManagerFacory in a given environment. Identifier can be particularly useful in an environment where multiple PersistenceManagerFacories are initialized in a system.

return
identifier

public booleangetIgnoreCache()
Returns the boolean value for the flag that allows the user to request that queries be optimized to return approximate results by ignoring changed values in the cache.

return
boolean setting for the flag

public intgetMaxPool()
Returns maximum number of PersistenceManager instances in the pool

return
maxPool

public intgetMinPool()
Returns minimum number of PersistenceManager instances in the pool

return
minPool

public booleangetNontransactionalRead()
Returns the boolean value for the flag that allows non-transactional instances to be managed in the cache.

return
boolean setting for the flag

public booleangetOptimistic()
Returns the boolean value of the optimistic flag for all PersistenceManagers

return
boolean optimistic flag

public PersistenceManagergetPersistenceManager()
Creates new PersistenceManager without extra info

return
the persistence manager

public PersistenceManagergetPersistenceManager(java.lang.String username, java.lang.String password)
Creates new PersistenceManager with specific username and password. Used to call ConnectionFactory.getConnection(String, String)

param
username datasource user
param
password datasource user password
return
the persistence manager

public java.util.PropertiesgetProperties()
Returns non-operational properties to be available to the application via a Properties instance.

return
Properties object

public intgetQueryTimeout()
Gets the number of seconds to wait for a query statement to execute in the datastore associated with this PersistenceManagerFactory.

return
timout value in seconds; zero means unlimited

public booleangetRequireCopyObjectId()
Returns the default value of the requireCopyObjectId flag for this PersistenceManagerFactory. If set to false, the PersistenceManager will not create a copy of an ObjectId for PersistenceManager.getObjectId(Object pc) and PersistenceManager.getObjectById(Object oid) requests.

see
PersistenceManager#getObjectId(Object pc)
see
PersistenceManager#getObjectById(Object oid)
return
boolean requireCopyObjectId flag

public booleangetRequireTrackedSCO()
Returns the boolean value of the requireTrackedSCO flag for this PersistenceManagerFactory. If set to false, by default the PersistenceManager will not create tracked SCO instances for new persistent instances at commit with retainValues set to true and while retrieving data from a datastore.

return
boolean requireTrackedSCO flag

public booleangetRetainValues()
Returns the boolean value for the flag that will not cause the eviction of persistent instances after transaction completion.

return
boolean setting for the flag

public booleangetSupersedeDeletedInstance()
Returns the boolean value of the supersedeDeletedInstance flag for all PersistenceManagers. If set to true, deleted instances are allowed to be replaced with persistent-new instances with the equal Object Id.

return
boolean supersedeDeletedInstance flag

public intgetUpdateTimeout()
Gets the number of seconds to wait for an update statement to execute in the datastore associated with this PersistenceManagerFactory.

return
timout value in seconds; zero means unlimited

public voidsetConnectionDriverName(java.lang.String driverName)
Sets JDBC driver name

param
driverName JDBC driver name

public voidsetConnectionFactory(java.lang.Object cf)
Sets Connection Factory as ConnectionFactory or javax.sql.DataSource

param
cf as java.lang.Object

public voidsetConnectionFactoryName(java.lang.String connectionFactoryName)
Sets ConnectionFactory name

param
connectionFactoryName ConnectionFactory name

public voidsetConnectionLogWriter(java.io.PrintWriter pw)
Sets the LogWriter to which messages should be sent

param
pw LogWriter

public voidsetConnectionLoginTimeout(int LoginTimeout)
Sets the number of seconds to wait for a new connection to be established to the data source

param
LoginTimeout wait time in seconds

public voidsetConnectionMaxPool(int MaxPool)
Sets maximum number of connections in the connection pool

param
MaxPool maximum number of connections

public voidsetConnectionMinPool(int MinPool)
Sets minimum number of connections in the connection pool

param
MinPool minimum number of connections

public voidsetConnectionMsInterval(int MsInterval)
Sets the amount of time, in milliseconds, between the connection manager's attempts to get a pooled connection.

param
MsInterval the interval between attempts to get a database connection, in milliseconds.

public voidsetConnectionMsWait(int MsWait)
Sets the number of milliseconds to wait for an available connection from the connection pool before throwing an exception

param
MsWait number in milliseconds

public voidsetConnectionPassword(java.lang.String password)
Sets database user password

param
password database user password

public voidsetConnectionTransactionIsolation(int level)
Sets transaction isolation level for all connections of this PersistenceManagerFactory. All validation is done by java.sql.Connection itself, so e.g. while Oracle will not allow to set solation level to TRANSACTION_REPEATABLE_READ, this method does not have any explicit restrictions

param
level - one of the java.sql.Connection.TRANSACTION_* isolation values

public voidsetConnectionURL(java.lang.String URL)
Sets JDBC connection URL

param
URL connection URL

public voidsetConnectionUserName(java.lang.String userName)
Sets database user

param
userName database user

public voidsetIdentifier(java.lang.String identifier)
Sets Identifier. An Identifier is a string that user can use to identify the PersistenceManagerFacory in a given environment. Identifier can be particularly useful in an environment where multiple PersistenceManagerFacories are initialized in a system.

param
identifier

public voidsetIgnoreCache(boolean flag)
Sets the flag that allows the user to request that queries be optimized to return approximate results by ignoring changed values in the cache.

param
flag boolean flag passed

public voidsetMaxPool(int MaxPool)
Sets maximum number of PersistenceManager instances in the pool

param
MaxPool maximum number of instances

public voidsetMinPool(int MinPool)
Sets minimum number of PersistenceManager instances in the pool

param
MinPool minimum number of PersistenceManager instances

public voidsetNontransactionalRead(boolean flag)
Sets the flag that allows non-transactional instances to be managed in the cache.

param
flag boolean flag passed

public voidsetOptimistic(boolean flag)
Sets the optimistic flag for all PersistenceManagers

param
flag boolean optimistic flag

public voidsetQueryTimeout(int timeout)
Sets the number of seconds to wait for a query statement to execute in the datastore associated with this PersistenceManagerFactory.

param
timeout new timout value in seconds; zero means unlimited

public voidsetRequireCopyObjectId(boolean flag)
Sets the default value of the requireCopyObjectId flag. If set to false, by default a PersistenceManager will not create a copy of an ObjectId for PersistenceManager.getObjectId(Object pc) and PersistenceManager.getObjectById(Object oid) requests.

see
PersistenceManager#getObjectId(Object pc)
see
PersistenceManager#getObjectById(Object oid)
param
flag boolean requireCopyObjectId flag

public voidsetRequireTrackedSCO(boolean flag)
Sets the requireTrackedSCO flag for this PersistenceManagerFactory. If set to false, by default the PersistenceManager will not create tracked SCO instances for new persistent instances at commit with retainValues set to true and while retrieving data from a datastore.

param
flag boolean requireTrackedSCO flag

public voidsetRetainValues(boolean flag)
Sets flag that will not cause the eviction of persistent instances after transaction completion.

param
flag boolean flag passed

public voidsetSupersedeDeletedInstance(boolean flag)
Sets the supersedeDeletedInstance flag for all PersistenceManagers.

param
flag boolean supersedeDeletedInstance flag

public voidsetUpdateTimeout(int timeout)
Sets the number of seconds to wait for an update statement to execute in the datastore associated with this PersistenceManagerFactory.

param
timeout new timout value in seconds; zero means unlimited