@Override public int hashCode() { long hash = hashCode64(); return (int)(hash ^ (hash >>> 32)); }
public boolean containsColumn(String tableName, String columnName) { long hashCode; int p = tableName.indexOf('.'); if (p != -1) { SQLExpr owner = SQLUtils.toSQLExpr(tableName, dbType); hashCode = new SQLPropertyExpr(owner, columnName).hashCode64(); } else { hashCode = FnvHash.hashCode64(tableName, columnName); } return columns.containsKey(hashCode); }
public Column(String table, String name){ this.table = table; this.name = name; int p = table.indexOf('.'); if (p != -1) { String dbType = null; if (table.indexOf('`') != -1) { dbType = JdbcConstants.MYSQL; } else if (table.indexOf('[') != -1) { dbType = JdbcConstants.SQL_SERVER; } else if (table.indexOf('@') != -1) { dbType = JdbcConstants.ORACLE; } SQLExpr owner = SQLUtils.toSQLExpr(table, dbType); hashCode64 = new SQLPropertyExpr(owner, name).hashCode64(); } else { hashCode64 = FnvHash.hashCode64(table, name); } }
@Override public long hashCode64() { if (hashCode64 == 0) { if (server == null) { hashCode64 = new SQLPropertyExpr( new SQLPropertyExpr(server, database) , schema) .hashCode64(); } else { hashCode64 = new SQLPropertyExpr(database, schema) .hashCode64(); } } return hashCode64; }
public boolean containsAlias(long aliasHash) { if (this.aliasHashCode64() == aliasHash) { return true; } if (expr instanceof SQLPropertyExpr) { long exprNameHash = ((SQLPropertyExpr) expr).hashCode64(); if (exprNameHash == aliasHash) { return true; } } if (expr instanceof SQLName) { long exprNameHash = ((SQLName) expr).nameHashCode64(); return exprNameHash == aliasHash; } return false; }
public SQLTableSource findTableSource(long alias_hash) { if (alias_hash == 0) { return null; } if (aliasHashCode64() == alias_hash) { return this; } if (expr instanceof SQLName) { long exprNameHash = ((SQLName) expr).nameHashCode64(); if (exprNameHash == alias_hash) { return this; } } if (expr instanceof SQLPropertyExpr) { long hash = ((SQLPropertyExpr) expr).hashCode64(); if (hash == alias_hash) { return this; } } return null; }
@Override public int hashCode() { long hash = hashCode64(); return (int)(hash ^ (hash >>> 32)); }
owner_hash = owner.nameHashCode64(); } else if (ownerObj instanceof SQLPropertyExpr) { owner_hash = ((SQLPropertyExpr) ownerObj).hashCode64();
public boolean containsColumn(String tableName, String columnName) { long hashCode; int p = tableName.indexOf('.'); if (p != -1) { SQLExpr owner = SQLUtils.toSQLExpr(tableName, dbType); hashCode = new SQLPropertyExpr(owner, columnName).hashCode64(); } else { hashCode = FnvHash.hashCode64(tableName, columnName); } return columns.containsKey(hashCode); }
public Column(String table, String name){ this.table = table; this.name = name; int p = table.indexOf('.'); if (p != -1) { String dbType = null; if (table.indexOf('`') != -1) { dbType = JdbcConstants.MYSQL; } else if (table.indexOf('[') != -1) { dbType = JdbcConstants.SQL_SERVER; } else if (table.indexOf('@') != -1) { dbType = JdbcConstants.ORACLE; } SQLExpr owner = SQLUtils.toSQLExpr(table, dbType); hashCode64 = new SQLPropertyExpr(owner, name).hashCode64(); } else { hashCode64 = FnvHash.hashCode64(table, name); } }
@Override public long hashCode64() { if (hashCode64 == 0) { if (server == null) { hashCode64 = new SQLPropertyExpr( new SQLPropertyExpr(server, database) , schema) .hashCode64(); } else { hashCode64 = new SQLPropertyExpr(database, schema) .hashCode64(); } } return hashCode64; }
public boolean containsAlias(long aliasHash) { if (this.aliasHashCode64() == aliasHash) { return true; } if (expr instanceof SQLPropertyExpr) { long exprNameHash = ((SQLPropertyExpr) expr).hashCode64(); if (exprNameHash == aliasHash) { return true; } } if (expr instanceof SQLName) { long exprNameHash = ((SQLName) expr).nameHashCode64(); return exprNameHash == aliasHash; } return false; }
public SQLTableSource findTableSource(long alias_hash) { if (alias_hash == 0) { return null; } if (aliasHashCode64() == alias_hash) { return this; } if (expr instanceof SQLName) { long exprNameHash = ((SQLName) expr).nameHashCode64(); if (exprNameHash == alias_hash) { return this; } } if (expr instanceof SQLPropertyExpr) { long hash = ((SQLPropertyExpr) expr).hashCode64(); if (hash == alias_hash) { return this; } } return null; }
owner_hash = owner.nameHashCode64(); } else if (ownerObj instanceof SQLPropertyExpr) { owner_hash = ((SQLPropertyExpr) ownerObj).hashCode64();