com.triactive.jdo
Interface PersistenceManagerFactory

All Superinterfaces:
javax.jdo.PersistenceManagerFactory, SchemaManagementOptions, java.io.Serializable
All Known Implementing Classes:
PersistenceManagerFactoryImpl

public interface PersistenceManagerFactory
extends javax.jdo.PersistenceManagerFactory, SchemaManagementOptions

An extension to the standard persistence manager factory interface including methods specific to TriActive JDO.

Author:
Mike Martin

Method Summary
 int getFetchSize()
          The default JDBC fetch size for all PersistenceManagers obtained from this factory.
 boolean getForceConnectionInit()
          The ForceConnectionInit setting for all PersistenceManagers obtained from this factory.
 java.lang.String getJdbcTrace()
          The JDBC trace options for all PersistenceManagers obtained from this factory.
 int getResultSetType()
          The default result set type for all PersistenceManagers obtained from this factory.
 int getTransactionIsolation()
          The default transaction isolation level for all PersistenceManagers obtained from this factory.
 void setFetchSize(int fetchSize)
          The default JDBC fetch size for all PersistenceManagers obtained from this factory.
 void setForceConnectionInit(boolean flag)
          The ForceConnectionInit setting for all PersistenceManagers obtained from this factory.
 void setJdbcTrace(java.lang.String jdbcTrace)
          The JDBC trace options for all PersistenceManagers obtained from this factory.
 void setResultSetType(int resultSetType)
          The default result set type for all PersistenceManagers obtained from this factory.
 void setResultSetType(java.lang.String resultSetTypeName)
          The default result set type for all PersistenceManagers obtained from this factory.
 void setTransactionIsolation(int isolationLevel)
          The default transaction isolation level for all PersistenceManagers obtained from this factory.
 void setTransactionIsolation(java.lang.String isolationLevelName)
          The default transaction isolation level for all PersistenceManagers obtained from this factory.
 
Methods inherited from interface javax.jdo.PersistenceManagerFactory
close, getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionURL, getConnectionUserName, getIgnoreCache, getMultithreaded, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getPersistenceManager, getPersistenceManager, getProperties, getRestoreValues, getRetainValues, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactoryName, setConnectionPassword, setConnectionURL, setConnectionUserName, setIgnoreCache, setMultithreaded, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setRestoreValues, setRetainValues, supportedOptions
 
Methods inherited from interface com.triactive.jdo.SchemaManagementOptions
getAutoCreateTables, getValidateConstraints, getValidateTables, setAutoCreateTables, setValidateConstraints, setValidateTables
 

Method Detail

getTransactionIsolation

public int getTransactionIsolation()
The default transaction isolation level for all PersistenceManagers obtained from this factory.

Returns:
the default transaction isolation level.

setTransactionIsolation

public void setTransactionIsolation(java.lang.String isolationLevelName)
The default transaction isolation level for all PersistenceManagers obtained from this factory.

Parameters:
isolationLevelName - One of the values "read uncommitted", "read committed", "repeatable read", or "serializable". The name is case-insensitive, and spaces and underscores are equivalent.

setTransactionIsolation

public void setTransactionIsolation(int isolationLevel)
The default transaction isolation level for all PersistenceManagers obtained from this factory.

Parameters:
isolationLevel - the default transaction isolation level.

getResultSetType

public int getResultSetType()
The default result set type for all PersistenceManagers obtained from this factory.

Returns:
the default transaction isolation level.

setResultSetType

public void setResultSetType(java.lang.String resultSetTypeName)
The default result set type for all PersistenceManagers obtained from this factory.

Parameters:
resultSetTypeName - One of the values "forward only", "scroll insensitive", or "scroll sensitive". The name is case-insensitive, and spaces and underscores are equivalent.

setResultSetType

public void setResultSetType(int resultSetType)
The default result set type for all PersistenceManagers obtained from this factory.

Parameters:
resultSetType - the default result set type.

getFetchSize

public int getFetchSize()
The default JDBC fetch size for all PersistenceManagers obtained from this factory.

Returns:
the default fetch size.

setFetchSize

public void setFetchSize(int fetchSize)
The default JDBC fetch size for all PersistenceManagers obtained from this factory.

Parameters:
fetchSize - The default fetch size. Zero indicates no specific size.

getForceConnectionInit

public boolean getForceConnectionInit()
The ForceConnectionInit setting for all PersistenceManagers obtained from this factory. If enabled, setAutoCommit() and setTransactionIsolationLevel() are called for every connection before use. Otherwise, they're called only if the requested setting differs from the connection's default setting.

Returns:
the ForceConnectionInit setting.

setForceConnectionInit

public void setForceConnectionInit(boolean flag)
The ForceConnectionInit setting for all PersistenceManagers obtained from this factory. If enabled, setAutoCommit() and setTransactionIsolationLevel() are called for every connection before use. Otherwise, they're called only if the requested setting differs from the connection's default setting.

Parameters:
flag - the ForceConnectionInit setting.

getJdbcTrace

public java.lang.String getJdbcTrace()
The JDBC trace options for all PersistenceManagers obtained from this factory.

Returns:
A comma-separated list of trace option keywords, or null if tracing is disabled.
See Also:
setJdbcTrace(java.lang.String)

setJdbcTrace

public void setJdbcTrace(java.lang.String jdbcTrace)
The JDBC trace options for all PersistenceManagers obtained from this factory.

Each trace option is enabled by including its keyword.

Option keyword Description
LogExecutionTimes Logs every executed SQL statement and its execution time in milliseconds
LogExecutionFailures Logs every SQL statement whose execution throws a SQLException
LogWarnings Logs every SQLWarning produced by a Connection, Statement, or ResultSet
When tracing is enabled low-overhead wrappers are placed around certain JDBC objects to perform the tracing. The wrappers are only used when tracing so zero overhead is imposed if tracing is disabled.

Parameters:
jdbcTrace - A comma-separated list of trace option keywords, or null to disable tracing entirely.
See Also:
InitializedConnectionFactory.setTraceOptions(java.lang.String)


Copyright 2001-2007 The TJDO Project All Rights Reserved.