/** * PUBLIC: * Return the field name of the field that stores the write lock value. */ public String getWriteLockFieldName() { return getWriteLockField().getQualifiedName(); }
/** * PUBLIC: * Return the field name of the field that stores the write lock value. */ public String getWriteLockFieldName() { return getWriteLockField().getQualifiedName(); }
/** * PUBLIC: * Name of the field this mapping represents. */ public String getFieldName() { return getField().getQualifiedName(); }
/** * PUBLIC: * Return the qualified field name for the query key. */ public String getQualifiedFieldName() { return getField().getQualifiedName(); }
/** * PUBLIC: * Return the qualified field name for the query key. */ public String getQualifiedFieldName() { return getField().getQualifiedName(); }
protected void addOneToManyMappingLines(NonreflectiveMethodDefinition method, String mappingName, OneToManyMapping mapping) { Enumeration targetKeysEnum = mapping.getTargetForeignKeyFields().elements(); Enumeration sourceKeysEnum = mapping.getSourceKeyFields().elements(); while (sourceKeysEnum.hasMoreElements()) { DatabaseField sourceField = (DatabaseField)sourceKeysEnum.nextElement(); DatabaseField targetField = (DatabaseField)targetKeysEnum.nextElement(); method.addLine(mappingName + ".addTargetForeignKeyFieldName(\"" + targetField.getQualifiedName() + "\", \"" + sourceField.getQualifiedName() + "\");"); } }
protected void addAggregateCollectionMappingLines(NonreflectiveMethodDefinition method, String mappingName, AggregateCollectionMapping mapping) { Enumeration targetKeysEnum = mapping.getTargetForeignKeyFields().elements(); Enumeration sourceKeysEnum = mapping.getSourceKeyFields().elements(); while (sourceKeysEnum.hasMoreElements()) { DatabaseField sourceField = (DatabaseField)sourceKeysEnum.nextElement(); DatabaseField targetField = (DatabaseField)targetKeysEnum.nextElement(); method.addLine(mappingName + ".addTargetForeignKeyFieldName(\"" + targetField.getQualifiedName() + "\", \"" + sourceField.getQualifiedName() + "\");"); } }
protected void addAggregateCollectionMappingLines(NonreflectiveMethodDefinition method, String mappingName, AggregateCollectionMapping mapping) { Enumeration targetKeysEnum = mapping.getTargetForeignKeyFields().elements(); Enumeration sourceKeysEnum = mapping.getSourceKeyFields().elements(); while (sourceKeysEnum.hasMoreElements()) { DatabaseField sourceField = (DatabaseField)sourceKeysEnum.nextElement(); DatabaseField targetField = (DatabaseField)targetKeysEnum.nextElement(); method.addLine(mappingName + ".addTargetForeignKeyFieldName(\"" + targetField.getQualifiedName() + "\", \"" + sourceField.getQualifiedName() + "\");"); } }
/** * PUBLIC: * Return the names of all the primary keys. */ public Vector<String> getPrimaryKeyFieldNames() { Vector<String> result = new Vector(getPrimaryKeyFields().size()); List primaryKeyFields = getPrimaryKeyFields(); for (int index = 0; index < primaryKeyFields.size(); index++) { result.addElement(((DatabaseField)primaryKeyFields.get(index)).getQualifiedName()); } return result; }
@Override public void setAttributeValueInObject(Object object, Object value) { ClassDescriptor mapping = (ClassDescriptor)object; Vector associations = (Vector)value; for (int index = 0; index < associations.size(); index++) { Association association = (Association)associations.get(index); association.setKey(((DatabaseField)association.getKey()).getQualifiedName()); association.setValue(((DatabaseField)association.getValue()).getQualifiedName()); } mapping.setForeignKeyFieldNamesForMultipleTable(associations); } });
/** * PUBLIC: * Returns the name of the field name in the reference table. */ public String getDirectFieldName() { if (getDirectField() == null) { return null; } return getDirectField().getQualifiedName(); }
/** * PUBLIC: * Get sequence number field name */ public String getSequenceNumberFieldName() { if (getSequenceNumberField() == null) { return null; } return getSequenceNumberField().getQualifiedName(); }
public void setAttributeValueInObject(Object object, Object value) { AggregateObjectMapping mapping = (AggregateObjectMapping)object; Vector associations = (Vector)value; for (int index = 0; index < associations.size(); index++) { Association association = (Association)associations.get(index); association.setKey(((DatabaseField)association.getKey()).getQualifiedName()); } mapping.setAggregateToSourceFieldAssociations(associations); } });
public void setAttributeValueInObject(Object object, Object value) { ClassDescriptor mapping = (ClassDescriptor)object; Vector associations = (Vector)value; for (int index = 0; index < associations.size(); index++) { Association association = (Association)associations.get(index); association.setKey(((DatabaseField)association.getKey()).getQualifiedName()); association.setValue(((DatabaseField)association.getValue()).getQualifiedName()); } mapping.setForeignKeyFieldNamesForMultipleTable(associations); } });
/** * PUBLIC: * Return the class indicator field name. * This is the name of the field in the table that stores what type of object this is. */ public String getClassIndicatorFieldName() { if (getClassIndicatorField() == null) { return null; } else { return getClassIndicatorField().getQualifiedName(); } }
public void setAttributeValueInObject(Object object, Object value) { VariableOneToOneMapping mapping = (VariableOneToOneMapping)object; Vector associations = (Vector)value; for (int index = 0; index < associations.size(); index++) { Association association = (Association)associations.get(index); association.setKey(((DatabaseField)association.getKey()).getQualifiedName()); } mapping.setSourceToTargetQueryKeyFieldAssociations(associations); } });
/** * PUBLIC: * This method returns the name of the typeField of the mapping. * The type field is used to store the type of object the relationship is referencing. */ public String getTypeFieldName() { if (getTypeField() == null) { return null; } return getTypeField().getQualifiedName(); }
/** * INTERNAL: * Print java for project class generation */ public void printJava(ExpressionJavaPrinter printer) { ((DataExpression)getLocalBase()).getBaseExpression().printJava(printer); printer.printString(".getParameter(\"" + getField().getQualifiedName() + "\")"); }
/** * INTERNAL: * Print java for project class generation */ public void printJava(ExpressionJavaPrinter printer) { ((DataExpression)getLocalBase()).getBaseExpression().printJava(printer); printer.printString(".getParameter(\"" + getField().getQualifiedName() + "\")"); }
/** * INTERNAL: * Print java for project class generation */ public void printJava(ExpressionJavaPrinter printer) { ((DataExpression)getLocalBase()).getBaseExpression().printJava(printer); printer.printString(".getParameter(\"" + getField().getQualifiedName() + "\")"); }