List of usage examples for org.hibernate.internal.util.config ConfigurationHelper getBoolean
public static boolean getBoolean(String name, Map values, boolean defaultValue)
From source file:com.hazelcast.hibernate.CacheEnvironment.java
License:Open Source License
public static boolean isNativeClient(Properties props) { return ConfigurationHelper.getBoolean(CacheEnvironment.USE_NATIVE_CLIENT, props, false); }
From source file:com.hazelcast.hibernate.CacheEnvironment.java
License:Open Source License
public static boolean shutdownOnStop(Properties props, boolean defaultValue) { return ConfigurationHelper.getBoolean(CacheEnvironment.SHUTDOWN_ON_STOP, props, defaultValue); }
From source file:com.hazelcast.hibernate.CacheEnvironment.java
License:Open Source License
public static boolean isExplicitVersionCheckEnabled(Properties props) { return ConfigurationHelper.getBoolean(CacheEnvironment.EXPLICIT_VERSION_CHECK, props, false); }
From source file:com.hazelcast.hibernate4.CacheEnvironment.java
License:Open Source License
public static boolean isLiteMember(Properties props) { return ConfigurationHelper.getBoolean(CacheEnvironment.USE_LITE_MEMBER, props, false); }
From source file:com.hazelcast.hibernate4.CacheEnvironment.java
License:Open Source License
@Deprecated public static boolean isSuperClient(Properties props) { return ConfigurationHelper.getBoolean(CacheEnvironment.USE_SUPER_CLIENT, props, false); }
From source file:com.tsoft.app.domain.identifier.StringSequenceIdentifier.java
@Override public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException { final JdbcEnvironment jdbcEnvironment = serviceRegistry.getService(JdbcEnvironment.class); final Dialect dialect = jdbcEnvironment.getDialect(); final ConfigurationService configurationService = serviceRegistry.getService(ConfigurationService.class); String globalEntityIdentifierPrefix = configurationService.getSetting("entity.identifier.prefix", String.class, "SEQ_"); sequencePrefix = ConfigurationHelper.getString(SEQUENCE_PREFIX, params, globalEntityIdentifierPrefix); final String sequencePerEntitySuffix = ConfigurationHelper.getString( SequenceStyleGenerator.CONFIG_SEQUENCE_PER_ENTITY_SUFFIX, params, SequenceStyleGenerator.DEF_SEQUENCE_SUFFIX); final String defaultSequenceName = ConfigurationHelper .getBoolean(SequenceStyleGenerator.CONFIG_PREFER_SEQUENCE_PER_ENTITY, params, false) ? params.getProperty(JPA_ENTITY_NAME) + sequencePerEntitySuffix : SequenceStyleGenerator.DEF_SEQUENCE_NAME; sequenceCallSyntax = dialect.getSequenceNextValString( ConfigurationHelper.getString(SequenceStyleGenerator.SEQUENCE_PARAM, params, defaultSequenceName)); }
From source file:de.innovationgate.webgate.api.mysql.GaleraClusterTableGenerator.java
License:Open Source License
@Override public void configure(Type type, Properties params, Dialect dialect) throws MappingException { identifierType = type;/*from w ww .j ava 2 s . c o m*/ tableName = determineGeneratorTableName(params, dialect); segmentColumnName = determineSegmentColumnName(params, dialect); valueColumnName = determineValueColumnName(params, dialect); segmentValue = determineSegmentValue(params); segmentValueLength = determineSegmentColumnSize(params); initialValue = determineInitialValue(params); incrementSize = determineIncrementSize(params); this.selectQuery = buildSelectQuery(dialect); this.updateQuery = buildUpdateQuery(); this.insertQuery = buildInsertQuery(); // if the increment size is greater than one, we prefer pooled optimization; but we // need to see if the user prefers POOL or POOL_LO... String defaultPooledOptimizerStrategy = ConfigurationHelper.getBoolean(Environment.PREFER_POOLED_VALUES_LO, params, false) ? OptimizerFactory.StandardOptimizerDescriptor.POOLED_LO.getExternalName() : OptimizerFactory.StandardOptimizerDescriptor.POOLED.getExternalName(); final String defaultOptimizerStrategy = incrementSize <= 1 ? OptimizerFactory.StandardOptimizerDescriptor.NONE.getExternalName() : defaultPooledOptimizerStrategy; final String optimizationStrategy = ConfigurationHelper.getString(OPT_PARAM, params, defaultOptimizerStrategy); optimizer = OptimizerFactory.buildOptimizer(optimizationStrategy, identifierType.getReturnedClass(), incrementSize, ConfigurationHelper.getInt(INITIAL_PARAM, params, -1)); }
From source file:de.innovationgate.webgate.api.mysql.GaleraClusterTableGenerator.java
License:Open Source License
/** * Used in the cases where {@link #determineSegmentValue} is unable to * determine the value to use.//from w ww .j a v a 2 s . c o m * * @param params The params supplied in the generator config (plus some standard useful extras). * @return The default segment value to use. */ protected String determineDefaultSegmentValue(Properties params) { boolean preferSegmentPerEntity = ConfigurationHelper.getBoolean(CONFIG_PREFER_SEGMENT_PER_ENTITY, params, false); String defaultToUse = preferSegmentPerEntity ? params.getProperty(TABLE) : DEF_SEGMENT_VALUE; LOG.usingDefaultIdGeneratorSegmentValue(tableName, segmentColumnName, defaultToUse); return defaultToUse; }
From source file:net.e6tech.elements.persist.hibernate.ModifiedTableGenerator.java
License:Apache License
/** * Used in the cases where {@link #determineSegmentValue} is unable to * determine the value to use.//ww w . j a va 2 s . c o m * * @param params The params supplied in the generator config (plus some standard useful extras). * @return The default segment value to use. */ protected String determineDefaultSegmentValue(Properties params) { final boolean preferSegmentPerEntity = ConfigurationHelper.getBoolean(CONFIG_PREFER_SEGMENT_PER_ENTITY, params, false); final String defaultToUse = preferSegmentPerEntity ? params.getProperty(TABLE) : DEF_SEGMENT_VALUE; LOG.usingDefaultIdGeneratorSegmentValue(qualifiedTableName.render(), segmentColumnName, defaultToUse); return defaultToUse; }