3.1j2ee.hibernate
3.1j2ee.hibernate
3.1.1Properties
- Activated: true
- ID: com.netfective.bluage.bsp.j2ee.hibernate
- Parent: BSP Persistence
- Child: N/A
3.1.2Child Property
3.1.2.1Setup (required)
- fwkPackage: defines the root package of the BLU AGE framework
- e.g.: com.netfective.bluage
- langageMapping: defines the file used to map the model types to the language types for the generated code.
- Java: file:/MODEL_PATH/../resources/mappings/JavaMappings.xml
- hibernateMapping: defines the file used to map the model types to hibernate types.
- e.g.: file:/MODEL_PATH/../resources/mappings/HibernateTypeMappings.xml
- wrapperMapping: defines the file used to map the language primitive type names to language wrapper type names.
- Java: file:/MODEL_PATH/../resources/mappings/JavaWrapperMappings.xml
- sqlMappingsUri: defines the URI mapping for the target database.
- MySQL: MySQL
- DB2-UDB: DB2-UDB
- MSSQL-2000: MSSQL-2000
- MSSQL-2005: MSSQL-2005
- Oracle9i (Default value): Oracle9i
- Oracle10g: Oracle10g
- Postgre: PostgreSQL
- Derby 10: Derby 10
- sqlMapping: defines the SQL mapping file for the target database.
- MySQL: file:/MODEL_PATH/../resources/mappings/MySQLMappings.xml
- DB2-UDB: file:/MODEL_PATH/../resources/mappings/DB2Mappings.xml
- MSSQL-2000 or MSSQL-2005: file:/MODEL_PATH/../resources/mappings/MSSQLMappings.xml
- Oracle 9i or 10g: file:/MODEL_PATH/../resources/mappings/Oracle9iMappings.xml
- Postgre: file:/MODEL_PATH/../resources/mappings/PostgreSQLMappings.xml
- Derby 10: file:/MODEL_PATH/../resources/mappings/DerbyMappings.xml
- hibernateDialect: defines the SQL dialect for the target database.
- MySQL: org.hibernate.dialect.MySQL5Dialect
- DB2-UDB: org.hibernate.dialect.DB2Dialect
- MSSQL-2000 or MSSQL-2005: org.hibernate.dialect.SQLServerDialect
- Oracle 9i: org.hibernate.dialect.Oracle9iDialect
- Oracle 10g: org.hibernate.dialect.Oracle10gDialect
- Postgre: org.hibernate.dialect.PostgreSQLDialect
- Derby 10: org.hibernate.dialect.DerbyDialect
- driver: defines the driver connection for the target database. This should be a fully qualified Java class name.
- MySQL: com.mysql.jdbc.Driver
- DB2-UDB: com.ibm.db2.jcc.DB2Driver
- MSSQL-2000: com.microsoft.jdbc.sqlserver.SQLServerDriver
- MSSQL-2005: com.microsoft.sqlserver.jdbc.SQLServerDriver
- Oracle 9i or 10g: oracle.jdbc.driver.OracleDriver
- Postgre: org.postgresql.Driver
- Derby 10: com.ibm.db2.jcc.DB2Driver
- TransactionsInDao: defines if the transactions are managed in the DAO (true or false).
3.1.2.2Default values
- version: defines the version of the hibernate framework.
- hibernateVersionProperty: defines the name of the property/attribute to automatically add to entities for versioning purposes. If this value is not specified or it contains only whitespace characters it will be ignored and the property will not be generated.
- hibernateEnableCache: defines whether the hibernate cache is enabled or not.
- true or false (default value)
- maxElementsInMemory: defines the max values of the number of elements present in memory.
- eternal: Indicates whether elements are eternal. If eternal, timeouts are ignored and the element never expires.
- true or false (default value)
- timeToIdleSeconds: Sets the time to idle an element before it expires.
- timeToLiveSeconds: Sets the time to live for an element before it expires.
- overflowToDisk: Indicates whether elements can overflow to disk when the in-memory cache has reached the maxInMemory limit.
- true (default value) or false
- hibernateUseQueryCache: defines whether the query cache is used or not.
- true or false (default value)
- hibernateCacheProvider: defines the “hibernate.cache.provider_class” property.
- default value: org.hibernate.cache.HashtableCacheProvider
- hibernateQueryCacheFactory: defines the “hibernate.cache.query_cache_factory” property.
- default value: net.sf.hibernate.cache.StandardQueryCacheFactory
- hibernateEnableDistributedCache: defines whether distributed caching will be enabled or not. To enable distributed caching for an entity, you must set this property to true AND tag the entity using the tagged value.
- true or false (default value)
- hibernateDistributedCacheMulticastPort: defines the multicast port to be used for multicast group communication when using a distributed cache provider.
- hibernateDistributedCacheMulticastAddress: defines the address to be used for multicast group communication when using a distributed cache provider.
- hibernateDistributedCacheSocketTimeout: defines the number of seconds client sockets will wait when sending messages to this listener until they give up.
- hibernateEhCacheDiskStore: Defines the path to the directory where cache files will be created.
- default value: java.io.tmpdir
- sequenceIdentifierSuffix: defines the sequence identifier suffix for the entities whose tag @sequence.name is not settled.
- hibernateTransactionFactoryClass: defines the classname of the transaction factory to use with Hibernate Transaction API.
- default value.: org.hibernate.transaction.JDBCTransactionFactory
- hibernateUserTransactionName: defines the “UserTransactionName” hibernate property.
- default value: UserTransaction
- serializable: defines whether or not generated objects must support distributed environments.
- true (default value) or false
- enablePropertyConstructors: defines whether or not constructors taking all properties will be generated or not.
- true (default value) or false
- hibernateDefaultCascade: defines the “cascade” property for the associations whose tag @cascade is not settled.
- hibernateJndiName: defines the JNDI name bound to the SessionFactory (“hibernate.session_factory_name” property).
- default value: java:/hibernate/SessionFactory
- xmlEncoding: defines the XML encoding value.
- generateEntityEqualsAndHashCode: defines if the methods equals() and hashCode() are generated for the BOs.
- true (default value) or false
- hibernateQueryFactory: defines the “hibernate.query.factory_class” property.
- default value: org.hibernate.hql.classic.ClassicQueryTranslatorFactory
- CloseBeforeFindAll: defines whether the hibernate session must be closed before a “findAll” execution or not.
- true (default value) or false
- FlushAfterFindAll: defines whether the hibernate session must be flushed after a “findAll” execution or not.
- true (default value) or false
- boLazyMode: defines the change of the implementation of the setObjMode() in children setter. If boLazyMode=false, the lazyMode won't work, and all BO are always fetched.
- true or false (default value)
- usec3p0: defines whether the C3P0ConnectionProvider is used or not.
- true or false (default value)
- c3p0.min_size: defines the “hibernate.c3p0.min_size” property.
- c3p0.max_size: defines the “hibernate.c3p0.max_size” property.
- c3p0.acquire_increment: defines the “hibernate.c3p0.acquire_increment” property.
- c3p0.idle_test_period: defines the “hibernate.c3p0.idle_test_period” property.
- c3p0.timeout: defines the “hibernate.c3p0.timeout” property.
- c3p0.max_statements: defines the “hibernate.c3p0.max_statements” property.
- hibernateJdbcUseScrollableResultSet: defines whether or not to enable use of JDBC2 scrollable resultsets by Hibernate (“hibernate.jdbc.use_scrollable_resultset” property). This property is only necessary when using user supplied connections. Hibernate uses connection metadata otherwise.
- true (default value) or false
- hibernateJdbcUseStreamsForBinary: defines the “hibernate.jdbc.use_streams_for_binary” property.
- true (default value) or false
- hibernateShowSql: defines whether the SQL orders must be displayed in the log file or not.
- true (default value) or false
- hibernateUseOuterJoin: defines whether outer joins are used or not.
- true (default value) or false
3.1.2.3Other
- dataSource: JNDI name of data source to use. Would be used instead of the connection properties, driver, username, password, etc (cf. “hibernate.connection.datasource”).
As of ver 3.5.1 and when using the hibernate-spring BSP (spring version >=2.0), the database connection can now be set up using the name of JNDI datasource instead of the regular connection settings (drive mode). If present, datasource settings will override the driver settings. - connectionUrl: defines the URL for the JDBC Driver to make the connection to the database.
- MySQL: jdbc:mysql://localhost/appbdd
- DB2-UDB: jdbc:db2://localhost:50000/BLUAGE:currentSchema=appbdd;
- MSSQL-2000: jdbc:microsoft:sqlserver://localhost;DatabaseName=appbdd;SelectMethod=cursor
- MSSQL-2005: jdbc:sqlserver://localhost:1433;databaseName=appbdd;SelectMethod=cursor
- Oracle 9i or 10g: jdbc:oracle:thin:@localhost:1521:appbdd
- Postgre: jdbc:postgresql://localhost/appbdd
- Derby 10: jdbc:derby:appbdd;
- username: defines the database user login name.
- password: defines the database user password.
- hibernatePoolSize: defines the “hibernate.connection.pool_size” hibernate property.
- headerMapping: defines the file with the header template for the generated hibernate mapping files.
- e.g.: file:/MODEL_PATH/../resources/mappings/HibernateMergeMappings.xml
- hibernateTransactionManagerLookup: defines the “hibernate.transaction.manager_lookup_class” hibernate property.
- e.g. :classname.of.TransactionManagerLookup
- hibernateTransactionManagerStrategy: defines the strategy for obtaining the JTA TransactionManager.
- e.g. : org.hibernate.transaction.JTATransactionFactory
- hibernateDefaultSchema: defines the unqualified tablenames with the given schema/tablespace in generated SQL (“hibernate.default_schema” property).
- hibernateJdbcBatchSize: defines the “hibernate.jdbc.batch_size” property.
- hibernateJdbcFetchSize: defines the “hibernate.jdbc.fetch_size” property.
- hibernateMaxFetchDepth: defines the “hibernate.max_fetch_depth” property.
- hibernateHbm2DDLAuto: allows to automatically validate or export schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly.
- update
- create
- create-drop
- none
- hibernateQuerySubstitutions: defines the “hibernate.query.substitutions” property.
- true or false (default value)
- hibernateConnectionReleaseMode: defines the “hibernate.connection.release_mode” property.
- hibernateCacheType: defines the type of cache used by hibernate. Not used.
- e.g.: EHCache