private int getMaxLen(String rule, DBIdentifier name, int maxLen) { IdentifierConfiguration config = getIdentifierConfiguration(); if (maxLen < 1) { IdentifierRule nrule = config.getIdentifierRule(rule); maxLen = nrule.getMaxLength(); } // Subtract delimiter length if name is delimited or will be delimited if (config.delimitAll() || name.isDelimited()) { maxLen = maxLen - (config.getLeadingDelimiter().length() + config.getTrailingDelimiter().length()); } return maxLen; }
private int getMaxLen(String rule, DBIdentifier name, int maxLen) { IdentifierConfiguration config = getIdentifierConfiguration(); if (maxLen < 1) { IdentifierRule nrule = config.getIdentifierRule(rule); maxLen = nrule.getMaxLength(); } // Subtract delimiter length if name is delimited or will be delimited if (config.delimitAll() || name.isDelimited()) { maxLen = maxLen - (config.getLeadingDelimiter().length() + config.getTrailingDelimiter().length()); } return maxLen; }
private int getMaxLen(String rule, DBIdentifier name, int maxLen) { IdentifierConfiguration config = getIdentifierConfiguration(); if (maxLen < 1) { IdentifierRule nrule = config.getIdentifierRule(rule); maxLen = nrule.getMaxLength(); } // Subtract delimiter length if name is delimited or will be delimited if (config.delimitAll() || name.isDelimited()) { maxLen = maxLen - (config.getLeadingDelimiter().length() + config.getTrailingDelimiter().length()); } return maxLen; }
private int getMaxLen(String rule, DBIdentifier name, int maxLen) { IdentifierConfiguration config = getIdentifierConfiguration(); if (maxLen < 1) { IdentifierRule nrule = config.getIdentifierRule(rule); maxLen = nrule.getMaxLength(); } // Subtract delimiter length if name is delimited or will be delimited if (config.delimitAll() || name.isDelimited()) { maxLen = maxLen - (config.getLeadingDelimiter().length() + config.getTrailingDelimiter().length()); } return maxLen; }
boolean delimit = !caseName.equals(name) || getIdentifierConfiguration().delimitAll(); return DBIdentifier.newIdentifier((delimit ? name : caseName), id, false, delimit, !delimCase.equals(CASE_PRESERVE));
boolean delimit = !caseName.equals(name) || getIdentifierConfiguration().delimitAll(); return DBIdentifier.newIdentifier((delimit ? name : caseName), id, false, delimit, !delimCase.equals(CASE_PRESERVE));
boolean delimit = !caseName.equals(name) || getIdentifierConfiguration().delimitAll(); return DBIdentifier.newIdentifier((delimit ? name : caseName), id, false, delimit, !delimCase.equals(CASE_PRESERVE));
boolean delimit = !caseName.equals(name) || getIdentifierConfiguration().delimitAll(); return DBIdentifier.newIdentifier((delimit ? name : caseName), id, false, delimit, !delimCase.equals(CASE_PRESERVE));
if (!getIdentifierConfiguration().delimitAll()) {
if (!getIdentifierConfiguration().delimitAll()) {
if (!getIdentifierConfiguration().delimitAll()) {
if (!getIdentifierConfiguration().delimitAll()) {
/** * Converts the identifier to a format appropriate for the configuration using * the specified naming rule. * @param delimit If false, do not delimit. Otherwise, delimit if necessary. */ private String toDBName(String rule, String name, boolean delimit) { if (name == null) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !Normalizer.isDelimited(name)) { return delimit(rule, name, true); } return convert(Normalizer.getNamingConfiguration(), rule, name); }
/** * Converts the identifier to a format appropriate for the configuration using * the specified naming rule. * @param delimit If false, do not delimit. Otherwise, delimit if necessary. */ private String toDBName(String rule, String name, boolean delimit) { if (name == null) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !Normalizer.isDelimited(name)) { return delimit(rule, name, true); } return convert(Normalizer.getNamingConfiguration(), rule, name); }
/** * Converts the identifier to a format appropriate for the configuration using * the specified naming rule. * @param delimit If false, do not delimit. Otherwise, delimit if necessary. */ private String toDBName(String rule, String name, boolean delimit) { if (name == null) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !Normalizer.isDelimited(name)) { return delimit(rule, name, true); } return convert(Normalizer.getNamingConfiguration(), rule, name); }
/** * Converts the identifier to a format appropriate for the configuration using * the specified naming rule. * @param delimit If false, do not delimit. Otherwise, delimit if necessary. */ private String toDBName(String rule, String name, boolean delimit) { if (name == null) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !Normalizer.isDelimited(name)) { return delimit(rule, name, true); } return convert(Normalizer.getNamingConfiguration(), rule, name); }
/** * Converts the name to a name which can be used within a SQL statement. Uses * the appropriate delimiters and separators. * @parm name a DBIdentifier * @param delimit If true, allows the name to be delimited, if necessary. * Otherwise, the identifier is not delimited. */ public String toDBName(DBIdentifier name, boolean delimit) { if (DBIdentifier.isNull(name)) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !name.isDelimited()) { return delimit(name, true); } String rule = name.getType().name(); if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; return convertFull(Normalizer.getNamingConfiguration(), rule, path.getName()); } return convert(Normalizer.getNamingConfiguration(), rule, name.getName()); }
/** * Converts the name to a name which can be used within a SQL statement. Uses * the appropriate delimiters and separators. * @parm name a DBIdentifier * @param delimit If true, allows the name to be delimited, if necessary. * Otherwise, the identifier is not delimited. */ public String toDBName(DBIdentifier name, boolean delimit) { if (DBIdentifier.isNull(name)) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !name.isDelimited()) { return delimit(name, true); } String rule = name.getType().name(); if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; return convertFull(Normalizer.getNamingConfiguration(), rule, path.getName()); } return convert(Normalizer.getNamingConfiguration(), rule, name.getName()); }
/** * Converts the name to a name which can be used within a SQL statement. Uses * the appropriate delimiters and separators. * @parm name a DBIdentifier * @param delimit If true, allows the name to be delimited, if necessary. * Otherwise, the identifier is not delimited. */ public String toDBName(DBIdentifier name, boolean delimit) { if (DBIdentifier.isNull(name)) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !name.isDelimited()) { return delimit(name, true); } String rule = name.getType().name(); if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; return convertFull(Normalizer.getNamingConfiguration(), rule, path.getName()); } return convert(Normalizer.getNamingConfiguration(), rule, name.getName()); }
/** * Converts the name to a name which can be used within a SQL statement. Uses * the appropriate delimiters and separators. * @parm name a DBIdentifier * @param delimit If true, allows the name to be delimited, if necessary. * Otherwise, the identifier is not delimited. */ public String toDBName(DBIdentifier name, boolean delimit) { if (DBIdentifier.isNull(name)) { return null; } if (getIdentifierConfiguration().getSupportsDelimitedIdentifiers() && delimit && getIdentifierConfiguration().delimitAll() && !name.isDelimited()) { return delimit(name, true); } String rule = name.getType().name(); if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; return convertFull(Normalizer.getNamingConfiguration(), rule, path.getName()); } return convert(Normalizer.getNamingConfiguration(), rule, name.getName()); }