|| _seconds.containsKey(tableName)
|| !DBIdentifier.isNull(path.getSchemaName()))
return tableName;
// decide which class-level join table is best match
DBIdentifier best = tableName;
int pts = 0;
DBIdentifier fullJoin = DBIdentifier.NULL;
DBIdentifier join = DBIdentifier.NULL;
for (Iterator<DBIdentifier> itr = _seconds.keySet().iterator(); itr.hasNext();) {
// award a caseless match without schema 2 points
fullJoin = (DBIdentifier) itr.next();
QualifiedDBIdentifier joinPath = QualifiedDBIdentifier.getPath(fullJoin);
if (joinPath.isUnqualifiedObject() && pts < 2 && fullJoin.equalsIgnoreCase(tableName)) {
best = fullJoin;
pts = 2;
} else if (joinPath.isUnqualifiedObject())
continue;
// immediately return an exact match with schema
join = joinPath.getIdentifier();
if (join.equals(tableName))
return fullJoin;
// caseless match with schema worth 1 point
if (pts < 1 && join.equalsIgnoreCase(tableName)) {
best = fullJoin;
pts = 1;
}
}
return best;