/** * 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); }
public String delimit(DBIdentifier name, boolean force) { String rule = name.getType().name(); // If this is a compound path, each item must be delimited // separately if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; // Make sure this is a qualified path before delimiting // separately if (!((path.getType() == DBIdentifierType.COLUMN && path.isUnqualifiedColumn()) || (path.getType() != DBIdentifierType.COLUMN && path.isUnqualifiedObject()))) { DBIdentifier[] names = QualifiedDBIdentifier.splitPath(name); for (int i = 0; i < names.length; i++) { DBIdentifier sName = names[i].getUnqualifiedName(); if (!sName.isDelimited()) { String pRule = sName.getType().name(); names[i].setName(delimit(pRule, sName.getName(), force)); } } return QualifiedDBIdentifier.newPath(names).getName(); } } return delimit(rule, name.getName(), force); }
public String delimit(DBIdentifier name, boolean force) { String rule = name.getType().name(); // If this is a compound path, each item must be delimited // separately if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; // Make sure this is a qualified path before delimiting // separately if (!((path.getType() == DBIdentifierType.COLUMN && path.isUnqualifiedColumn()) || (path.getType() != DBIdentifierType.COLUMN && path.isUnqualifiedObject()))) { DBIdentifier[] names = QualifiedDBIdentifier.splitPath(name); for (int i = 0; i < names.length; i++) { DBIdentifier sName = names[i].getUnqualifiedName(); if (!sName.isDelimited()) { String pRule = sName.getType().name(); names[i].setName(delimit(pRule, sName.getName(), force)); } } return QualifiedDBIdentifier.newPath(names).getName(); } } return delimit(rule, name.getName(), force); }
public String delimit(DBIdentifier name, boolean force) { String rule = name.getType().name(); // If this is a compound path, each item must be delimited // separately if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; // Make sure this is a qualified path before delimiting // separately if (!((path.getType() == DBIdentifierType.COLUMN && path.isUnqualifiedColumn()) || (path.getType() != DBIdentifierType.COLUMN && path.isUnqualifiedObject()))) { DBIdentifier[] names = QualifiedDBIdentifier.splitPath(name); for (int i = 0; i < names.length; i++) { DBIdentifier sName = names[i].getUnqualifiedName(); if (!sName.isDelimited()) { String pRule = sName.getType().name(); names[i].setName(delimit(pRule, sName.getName(), force)); } } return QualifiedDBIdentifier.newPath(names).getName(); } } return delimit(rule, name.getName(), force); }
public String delimit(DBIdentifier name, boolean force) { String rule = name.getType().name(); // If this is a compound path, each item must be delimited // separately if (name instanceof QualifiedDBIdentifier) { QualifiedDBIdentifier path = (QualifiedDBIdentifier)name; // Make sure this is a qualified path before delimiting // separately if (!((path.getType() == DBIdentifierType.COLUMN && path.isUnqualifiedColumn()) || (path.getType() != DBIdentifierType.COLUMN && path.isUnqualifiedObject()))) { DBIdentifier[] names = QualifiedDBIdentifier.splitPath(name); for (int i = 0; i < names.length; i++) { DBIdentifier sName = names[i].getUnqualifiedName(); if (!sName.isDelimited()) { String pRule = sName.getType().name(); names[i].setName(delimit(pRule, sName.getName(), force)); } } return QualifiedDBIdentifier.newPath(names).getName(); } } return delimit(rule, name.getName(), force); }
/** * 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()); }