private static String transform(String s, boolean caseSensitive) { if (!caseSensitive) { return Case.LOWER.apply(s); } else { return s; } }
private static String transform(String s, boolean caseSensitive) { if (!caseSensitive) { return Case.LOWER.apply(s); } else { return s; } }
@Override public String getPrefix(String tableName) { return "index_" + Case.LOWER.apply(tableName); } }
@Override public String getPrefix(String tableName) { return "index_" + Case.LOWER.apply(tableName); } }
@Override public String convertName(String name) { return fieldNameCase.apply(camelCaseToUnderScore(name)); } }
@Override public String getName(String tableName, String fieldName) { return getPrefix(tableName) + "_" + Case.LOWER.apply(fieldName); }
@Override protected boolean shouldQuoteTableName(String tableName) { return getReservedWords().contains(Case.UPPER.apply(tableName)); }
@Override protected boolean shouldQuoteTableName(String tableName) { return getReservedWords().contains(Case.UPPER.apply(tableName)); }
@Override public String convertName(String name) { return fieldNameCase.apply(camelCaseToUnderScore(name)); } }
@Override public String getName(String tableName, String fieldName) { return getPrefix(tableName) + "_" + Case.LOWER.apply(fieldName); }
/** * Determines whether or not the specified identifier should be quoted * before transmission to the underlying database. The default implementation * transforms the identifier into all-upper-case and checks the result * against {@link #getReservedWords()}. Databases with more complicated * rules regarding quoting should provide a custom implementation of this * method. * * @param id The identifier to check against the quoting rules. * @return <code>true</code> if the specified identifier is invalid under * the relevant quoting rules, otherwise <code>false</code>. */ protected boolean shouldQuoteID(String id) { return getReservedWords().contains(Case.UPPER.apply(id)); }
/** * Determines whether or not the specified identifier should be quoted * before transmission to the underlying database. The default implementation * transforms the identifier into all-upper-case and checks the result * against {@link #getReservedWords()}. Databases with more complicated * rules regarding quoting should provide a custom implementation of this * method. * * @param id The identifier to check against the quoting rules. * @return <code>true</code> if the specified identifier is invalid under * the relevant quoting rules, otherwise <code>false</code>. */ protected boolean shouldQuoteID(String id) { return getReservedWords().contains(Case.UPPER.apply(id)); }
@Override protected String getName(String entityClassCanonicalName) { return tableNameCase.apply(camelCaseToUnderScore(convertSimpleClassName(entityClassCanonicalName))); } }
@Override public String getSchema() { return isSchemaNotEmpty() ? Case.UPPER.apply(super.getSchema()) : null; }
@Override protected String getName(String entityClassCanonicalName) { return tableNameCase.apply(camelCaseToUnderScore(convertSimpleClassName(entityClassCanonicalName))); } }
@Override public String getSchema() { return isSchemaNotEmpty() ? Case.UPPER.apply(super.getSchema()) : null; }