List of usage examples for org.hibernate.engine.jdbc.env.spi JdbcEnvironment getIdentifierHelper
IdentifierHelper getIdentifierHelper();
From source file:cn.tata.t2s.ssm.util.AcmeCorpPhysicalNamingStrategy.java
License:LGPL
@Override public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment) { final List<String> parts = splitAndReplace(name.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:cn.tata.t2s.ssm.util.AcmeCorpPhysicalNamingStrategy.java
License:LGPL
@Override public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment) { final LinkedList<String> parts = splitAndReplace(name.getText()); // Acme Corp says all sequences should end with _seq if (!"seq".equalsIgnoreCase(parts.getLast())) { parts.add("seq"); }/* w w w . j ava 2 s . c om*/ return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:cn.tata.t2s.ssm.util.AcmeCorpPhysicalNamingStrategy.java
License:LGPL
@Override public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment jdbcEnvironment) { final List<String> parts = splitAndReplace(name.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:com.example.ejb3.auction.NamingStrategy.java
License:Apache License
@Override public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment) { return jdbcEnvironment.getIdentifierHelper().toIdentifier(addUnderscores(name.getText()), name.isQuoted()); }
From source file:com.example.ejb3.auction.NamingStrategy.java
License:Apache License
@Override public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment jdbcEnvironment) { return jdbcEnvironment.getIdentifierHelper().toIdentifier(addUnderscores(name.getText()), name.isQuoted()); }
From source file:com.kpb.other.AcmeCorpPhysicalNamingStrategy.java
License:LGPL
public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment) { final List<String> parts = splitAndReplace(name.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:com.kpb.other.AcmeCorpPhysicalNamingStrategy.java
License:LGPL
public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment) { final LinkedList<String> parts = splitAndReplace(name.getText()); // Acme Corp says all sequences should end with _seq if (!"seq".equalsIgnoreCase(parts.getLast())) { parts.add("seq"); }/*from ww w.ja v a2 s.c o m*/ return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:com.kpb.other.AcmeCorpPhysicalNamingStrategy.java
License:LGPL
public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment jdbcEnvironment) { final List<String> parts = splitAndReplace(name.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:com.spring.common.config.DefaultPhysicalNamingStrategy.java
License:LGPL
@Override public Identifier toPhysicalSequenceName(Identifier name, JdbcEnvironment jdbcEnvironment) { final LinkedList<String> parts = splitAndReplace(name.getText()); return jdbcEnvironment.getIdentifierHelper().toIdentifier(join(parts), name.isQuoted()); }
From source file:net.e6tech.elements.persist.hibernate.ModifiedTableGenerator.java
License:Apache License
/** * Determine the table name to use for the generator values. * * Called during {@link #configure configuration}. * * @see #getTableName()//from w w w.ja v a2 s.c o m * @param params The params supplied in the generator config (plus some standard useful extras). * @param jdbcEnvironment The JDBC environment * @return The table name to use. */ @SuppressWarnings("UnusedParameters") protected QualifiedName determineGeneratorTableName(Properties params, JdbcEnvironment jdbcEnvironment) { final String tableName = ConfigurationHelper.getString(TABLE_PARAM, params, DEF_TABLE); if (tableName.contains(".")) { return QualifiedNameParser.INSTANCE.parse(tableName); } else { // todo : need to incorporate implicit catalog and schema names final Identifier catalog = jdbcEnvironment.getIdentifierHelper() .toIdentifier(ConfigurationHelper.getString(CATALOG, params)); final Identifier schema = jdbcEnvironment.getIdentifierHelper() .toIdentifier(ConfigurationHelper.getString(SCHEMA, params)); return new QualifiedNameParser.NameParts(catalog, schema, jdbcEnvironment.getIdentifierHelper().toIdentifier(tableName)); } }