|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cfg.Environment
public final class Environment
Provides access to configuration info passed in Properties objects.
Hibernate has two property scopes:
property | meaning |
hibernate.dialect | classname of org.hibernate.dialect.Dialect subclass |
hibernate.connection.provider_class | classname of org.hibernate.service.jdbc.connections.spi.ConnectionProvider subclass (if not specified hueristics are used) |
hibernate.connection.username | database username |
hibernate.connection.password | database password |
hibernate.connection.url | JDBC URL (when using java.sql.DriverManager) |
hibernate.connection.driver_class | classname of JDBC driver |
hibernate.connection.isolation | JDBC transaction isolation level (only when using java.sql.DriverManager) | hibernate.connection.pool_size | the maximum size of the connection pool (only when using java.sql.DriverManager) |
hibernate.connection.datasource | databasource JNDI name (when using javax.sql.Datasource) |
hibernate.jndi.url | JNDI InitialContext URL |
hibernate.jndi.class | JNDI InitialContext classname |
hibernate.max_fetch_depth | maximum depth of outer join fetching |
hibernate.jdbc.batch_size | enable use of JDBC2 batch API for drivers which support it |
hibernate.jdbc.fetch_size | set the JDBC fetch size |
hibernate.jdbc.use_scrollable_resultset | enable use of JDBC2 scrollable resultsets (you only need this specify this property when using user supplied connections) |
hibernate.jdbc.use_getGeneratedKeys | enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver and JRE1.4+ |
hibernate.hbm2ddl.auto | enable auto DDL export |
hibernate.default_schema | use given schema name for unqualified tables (always optional) |
hibernate.default_catalog | use given catalog name for unqualified tables (always optional) |
hibernate.session_factory_name | If set, the factory attempts to bind this name to itself in the JNDI context. This name is also used to support cross JVM Session (de)serialization. |
hibernate.transaction.manager_lookup_class | classname of org.hibernate.transaction.TransactionManagerLookup implementor |
hibernate.transaction.factory_class | the factory to use for instantiating Transactions. (Defaults to JdbcTransactionFactory.) |
hibernate.query.substitutions | query language token substitutions |
SessionFactory
Field Summary |
---|
Method Summary | |
---|---|
static BytecodeProvider |
buildBytecodeProvider(Properties properties)
|
static BytecodeProvider |
getBytecodeProvider()
|
static Properties |
getProperties()
Return System properties, extended by any properties specified in hibernate.properties. |
static String |
isolationLevelToString(int isolation)
Get the name of a JDBC transaction isolation level |
static boolean |
jvmHasTimestampBug()
Does this JVM's implementation of Timestamp have a bug in which the following is true:
new java.sql.Timestamp( x ).getTime() != x
NOTE : IBM JDK 1.3.1 the only known JVM to exhibit this behavior. |
static boolean |
useReflectionOptimizer()
Should we use reflection optimization? |
static boolean |
useStreamsForBinary()
Should we use streams to bind binary types to JDBC IN parameters? |
static void |
verifyProperties(Map<?,?> configurationValues)
Issues warnings to the user when any obsolete or renamed property names are used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void verifyProperties(Map<?,?> configurationValues)
configurationValues
- The specified properties.public static BytecodeProvider getBytecodeProvider()
public static boolean jvmHasTimestampBug()
Timestamp
have a bug in which the following is true:
new java.sql.Timestamp( x ).getTime() != x
NOTE : IBM JDK 1.3.1 the only known JVM to exhibit this behavior.
Timestamp
implementapublic static boolean useStreamsForBinary()
AvailableSettings.USE_STREAMS_FOR_BINARY
public static boolean useReflectionOptimizer()
AvailableSettings.USE_REFLECTION_OPTIMIZER
,
getBytecodeProvider()
,
BytecodeProvider.getReflectionOptimizer(java.lang.Class, java.lang.String[], java.lang.String[], java.lang.Class[])
public static Properties getProperties()
public static String isolationLevelToString(int isolation)
isolation
- as defined by java.sql.Connection
Connection
public static BytecodeProvider buildBytecodeProvider(Properties properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |