/** * INTERNAL: * Return all the fields */ public Vector getFields() { if (isAttribute()) { Vector result = new Vector(1); DatabaseField field = getField(); if (field != null) { result.addElement(field); } return result; } else if ((getMapping() != null) && getMapping().isTransformationMapping()) { return getMapping().getFields(); } else { if(isUsingOuterJoinForMultitableInheritance()) { return getDescriptor().getAllFields(); } else { return super.getFields(); } } }
Object nullValue = ((AbstractDirectMapping)mapping).getAttributeValue(null, policy.getSession()); mapping.setAttributeValueInObject(copy, nullValue); } else if (mapping.isTransformationMapping()) { mapping.setAttributeValueInObject(copy, null);
/** * INTERNAL: * Find the alias for a given table */ public DatabaseTable aliasForTable(DatabaseTable table) { if (isAttribute() || ((getMapping() != null) && (getMapping().isAggregateObjectMapping() || getMapping().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 ((getMapping() != null) && (getMapping().isReferenceMapping() || getMapping().isStructureMapping())) { DatabaseTable alias = getBaseExpression().aliasForTable((DatabaseTable)getMapping().getDescriptor().getTables().firstElement()); alias.setName(alias.getName() + "." + getMapping().getField().getName()); return alias; } return super.aliasForTable(table); }