Example usage for org.hibernate.boot.model.naming Identifier isQuoted

List of usage examples for org.hibernate.boot.model.naming Identifier isQuoted

Introduction

In this page you can find the example usage for org.hibernate.boot.model.naming Identifier isQuoted.

Prototype

boolean isQuoted

To view the source code for org.hibernate.boot.model.naming Identifier isQuoted.

Click Source Link

Usage

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");
    }//from w  w  w.ja  v a 2s  . 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.bxf.hradmin.common.persistence.MyNamingStrategy.java

License:Open Source License

@Override
public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment) {
    return super.toPhysicalTableName(Identifier.toIdentifier(TABLE_PREFIX + name.getText(), name.isQuoted()),
            jdbcEnvironment);/*  w w  w.  j  a v  a2  s .c om*/
}

From source file:com.evolveum.midpoint.repo.sql.util.MidPointPhysicalNamingStrategy.java

License:Apache License

@Override
public Identifier toPhysicalTableName(Identifier identifier, JdbcEnvironment jdbcEnvironment) {
    String name = identifier.getText();
    if (name.startsWith("m_") || "hibernate_sequence".equals(name)) {
        return identifier;
    }//from  w  w w  . ja va 2s  .  c  o  m

    name = name.substring(1);
    name = "m_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
    name = RUtil.fixDBSchemaObjectNameLength(name);

    Identifier i = new Identifier(name, identifier.isQuoted());

    LOGGER.trace("toPhysicalTableName {} -> {}", identifier, i);

    return i;
}

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   www .  j a  v a  2  s  .c om*/
    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());
}