/** * INTERNAL: * Find the alias for a given table. A TableEntry is a place holder and its base expression holds * all the relevant information. Get the alias from the baseExpression */ @Override public DatabaseTable aliasForTable(DatabaseTable table) { return ((DataExpression)getBaseExpression()).aliasForTable(table); }
/** * INTERNAL: * Find the alias for a given table. A TableEntry is a place holder and its base expression holds * all the relevant information. Get the alias from the baseExpression */ @Override public DatabaseTable aliasForTable(DatabaseTable table) { return ((DataExpression)getBaseExpression()).aliasForTable(table); }
/** * INTERNAL: * Find the alias for a given table. A TableEntry is a place holder and its base expression holds * all the relevant information. Get the alias from the baseExpression */ public DatabaseTable aliasForTable(DatabaseTable table) { return ((DataExpression)getBaseExpression()).aliasForTable(table); }
/** * Return the alias for our table */ protected DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)this.baseExpression; DatabaseTable alias = base.aliasForTable(getField().getTable()); if (alias == null) { return getField().getTable(); } else { return alias; } }
/** * Return the alias for our table */ protected DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)this.baseExpression; DatabaseTable alias = base.aliasForTable(getField().getTable()); if (alias == null) { return getField().getTable(); } else { return alias; } }
/** * Return the alias for our table */ protected DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseTable alias = base.aliasForTable(getField().getTable()); if (alias == null) { return getField().getTable(); } else { return alias; } }
/** * Return the alias for our table */ protected DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseTable alias = base.aliasForTable(getField().getTable()); if (alias == null) { return getField().getTable(); } else { return alias; } }
/** * Return the alias for our table */ protected DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseTable alias = base.aliasForTable(getField().getTable()); if (alias == null) { return getField().getTable(); } else { return alias; } }
/** * Return the alias for our table */ protected DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseTable alias = base.aliasForTable(getField().getTable()); if (alias == null) { return getField().getTable(); } else { return alias; } }
/** * Return the alias for our table */ private DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseField field = getField(); if (!field.hasTableName()) { if (base.getDescriptor() != null){ field = base.getDescriptor().buildField(field); } } DatabaseTable alias = base.aliasForTable(field.getTable()); if (alias == null) { return field.getTable(); } else { return alias; } }
/** * Return the alias for our table */ private DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseField field = getField(); if (!field.hasTableName()) { if (base.getDescriptor() != null){ field = base.getDescriptor().buildField(field); } } DatabaseTable alias = base.aliasForTable(field.getTable()); if (alias == null) { return field.getTable(); } else { return alias; } }
/** * Return the alias for our table */ private DatabaseTable getAliasedTable() { DataExpression base = (DataExpression)getBaseExpression(); DatabaseField field = getField(); if (!field.hasTableName()) { if (base.getDescriptor() != null){ field = base.getDescriptor().buildField(field); } } DatabaseTable alias = base.aliasForTable(field.getTable()); if (alias == null) { return field.getTable(); } else { return alias; } }
/** * INTERNAL: * Find the alias for a given table */ @Override public DatabaseTable aliasForTable(DatabaseTable table) { DatabaseMapping mapping = getMapping(); if (isAttribute() || ((mapping != null) && (mapping.isAggregateObjectMapping() || mapping.isTransformationMapping()))) { return ((DataExpression)this.baseExpression).aliasForTable(table); } //"ref" and "structure" mappings, no table printed in the FROM clause, need to get the table alias form the parent table if ((mapping != null) && (mapping.isReferenceMapping() || mapping.isStructureMapping())) { DatabaseTable alias = this.baseExpression.aliasForTable(mapping.getDescriptor().getTables().firstElement()); alias.setName(alias.getName() + "." + mapping.getField().getName()); return alias; } // For direct-collection mappings the alias is store on the table expression. if ((mapping != null) && (mapping.isDirectCollectionMapping())) { if (tableAliases != null){ DatabaseTable aliasedTable = tableAliases.keyAtValue(table); if (aliasedTable != null){ return aliasedTable; } } return getTable(table).aliasForTable(table); } return super.aliasForTable(table); }
/** * INTERNAL: * Find the alias for a given table */ @Override public DatabaseTable aliasForTable(DatabaseTable table) { DatabaseMapping mapping = getMapping(); if (isAttribute() || ((mapping != null) && (mapping.isAggregateObjectMapping() || mapping.isTransformationMapping()))) { return ((DataExpression)this.baseExpression).aliasForTable(table); } //"ref" and "structure" mappings, no table printed in the FROM clause, need to get the table alias form the parent table if ((mapping != null) && (mapping.isReferenceMapping() || mapping.isStructureMapping())) { DatabaseTable alias = this.baseExpression.aliasForTable(mapping.getDescriptor().getTables().firstElement()); alias.setName(alias.getName() + "." + mapping.getField().getName()); return alias; } // For direct-collection mappings the alias is store on the table expression. if ((mapping != null) && (mapping.isDirectCollectionMapping())) { if (tableAliases != null){ DatabaseTable aliasedTable = tableAliases.keyAtValue(table); if (aliasedTable != null){ return aliasedTable; } } return getTable(table).aliasForTable(table); } return super.aliasForTable(table); }
/** * INTERNAL: * Find the alias for a given table */ public DatabaseTable aliasForTable(DatabaseTable table) { DatabaseMapping mapping = getMapping(); if (isAttribute() || ((mapping != null) && (mapping.isAggregateObjectMapping() || mapping.isTransformationMapping()))) { return ((DataExpression)getBaseExpression()).aliasForTable(table); } //"ref" and "structure" mappings, no table printed in the FROM clause, need to get the table alias form the parent table if ((mapping != null) && (mapping.isReferenceMapping() || mapping.isStructureMapping())) { DatabaseTable alias = getBaseExpression().aliasForTable(mapping.getDescriptor().getTables().firstElement()); alias.setName(alias.getName() + "." + mapping.getField().getName()); return alias; } // For direct-collection mappings the alias is store on the table expression. if ((mapping != null) && (mapping.isDirectCollectionMapping())) { if (tableAliases != null){ DatabaseTable aliasedTable = tableAliases.keyAtValue(table); if (aliasedTable != null){ return aliasedTable; } } return getTable(table).aliasForTable(table); } return super.aliasForTable(table); }