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); } });
/** * INTERNAL: * Return an object representing an entry in the collection represented by this container policy * This method will returns an Association containing the key and the value for a Map */ @Override public Object buildCollectionEntry(Object objectAdded, ObjectChangeSet changeSet){ return new Association(changeSet.getNewKey(), objectAdded); }
/** * INTERNAL: * This method is used by the XML Deployment ClassDescriptor to read and write these mappings */ public void setForeignKeyFieldNamesForMultipleTable(Vector associations) throws DescriptorException { Enumeration foreignKeys = associations.elements(); while (foreignKeys.hasMoreElements()) { Association association = (Association) foreignKeys.nextElement(); addForeignKeyFieldNameForMultipleTable((String) association.getKey(), (String) association.getValue()); } }
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); } });
/** * INTERNAL: * Needed for backwards compatibility */ public Vector getFieldNameToMethodNameAssociations() { Vector associations = new Vector(); for (Iterator source = getFieldTransformations().iterator(); source.hasNext();) { FieldTransformation tf = (FieldTransformation)source.next(); if (tf instanceof MethodBasedFieldTransformation) { Association ass = new Association(); ass.setKey(tf.getField().getQualifiedName()); ass.setValue(((MethodBasedFieldTransformation)tf).getMethodName()); associations.addElement(ass); } } return associations; }
/** * INTERNAL: * This method is used by the XML Deployment ClassDescriptor to read and write these mappings */ public void setForeignKeyFieldNamesForMultipleTable(Vector associations) throws DescriptorException { Enumeration foreignKeys = associations.elements(); while (foreignKeys.hasMoreElements()) { Association association = (Association) foreignKeys.nextElement(); addForeignKeyFieldNameForMultipleTable((String) association.getKey(), (String) association.getValue()); } }
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); } });
/** * INTERNAL: * Needed for backwards compatibility */ public Vector getFieldNameToMethodNameAssociations() { Vector associations = new Vector(); for (Iterator source = getFieldTransformations().iterator(); source.hasNext();) { FieldTransformation tf = (FieldTransformation)source.next(); if (tf instanceof MethodBasedFieldTransformation) { Association ass = new Association(); ass.setKey(tf.getField().getQualifiedName()); ass.setValue(((MethodBasedFieldTransformation)tf).getMethodName()); associations.addElement(ass); } } return associations; }
@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); } });
/** * INTERNAL: * This method is used by the XML Deployment ClassDescriptor to read and write these mappings */ public void setForeignKeyFieldNamesForMultipleTable(Vector associations) throws DescriptorException { Enumeration foreignKeys = associations.elements(); while (foreignKeys.hasMoreElements()) { Association association = (Association) foreignKeys.nextElement(); addForeignKeyFieldNameForMultipleTable((String) association.getKey(), (String) association.getValue()); } }
public Object getAttributeValueFromObject(Object object) { Map sourceToTargetKeyFields = ((EISOneToOneMapping)object).getSourceToTargetKeyFields(); List associations = new ArrayList(sourceToTargetKeyFields.size()); Iterator iterator = sourceToTargetKeyFields.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry)iterator.next(); associations.add(new Association(entry.getKey(), entry.getValue())); } return associations; }
@Override 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); } });
/** * INTERNAL: * Needed for backwards compatibility */ public Vector getFieldNameToMethodNameAssociations() { Vector associations = new Vector(); for (Iterator source = getFieldTransformations().iterator(); source.hasNext();) { FieldTransformation tf = (FieldTransformation)source.next(); if (tf instanceof MethodBasedFieldTransformation) { Association ass = new Association(); ass.setKey(tf.getField().getQualifiedName()); ass.setValue(((MethodBasedFieldTransformation)tf).getMethodName()); associations.addElement(ass); } } return associations; }
public Object getAttributeValueFromObject(Object object) { ClassDescriptor mapping = (ClassDescriptor)object; Vector associations = mapping.getMultipleTablePrimaryKeyAssociations(); for (int index = 0; index < associations.size(); index++) { Association association = (Association)associations.get(index); association.setKey(new DatabaseField((String)association.getKey())); association.setValue(new DatabaseField((String)association.getValue())); } return associations; }
/** * INTERNAL: * Set a collection of the aggregate to source field name associations. */ public void setAggregateToSourceFieldAssociations(Vector<Association> fieldAssociations) { Hashtable fieldNames = new Hashtable(fieldAssociations.size() + 1); for (Enumeration associationsEnum = fieldAssociations.elements(); associationsEnum.hasMoreElements();) { Association association = (Association)associationsEnum.nextElement(); fieldNames.put(association.getKey(), association.getValue()); } setAggregateToSourceFields(fieldNames); }
public Object getAttributeValueFromObject(Object object) { Map sourceToTargetKeyFields = ((OneToOneMapping)object).getSourceToTargetKeyFields(); List associations = new ArrayList(sourceToTargetKeyFields.size()); Iterator iterator = sourceToTargetKeyFields.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry)iterator.next(); associations.add(new Association(entry.getKey(), entry.getValue())); } return associations; }
@Override 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 Object getAttributeValueFromObject(Object object) { ClassDescriptor mapping = (ClassDescriptor)object; Vector associations = mapping.getMultipleTablePrimaryKeyAssociations(); for (int index = 0; index < associations.size(); index++) { Association association = (Association)associations.get(index); association.setKey(new DatabaseField((String)association.getKey())); association.setValue(new DatabaseField((String)association.getValue())); } return associations; }
/** * INTERNAL: * Set a collection of the aggregate to source field name associations. */ public void setAggregateToSourceFieldNameAssociations(Vector<Association> fieldAssociations) { Hashtable fieldNames = new Hashtable(fieldAssociations.size() + 1); for (Enumeration associationsEnum = fieldAssociations.elements(); associationsEnum.hasMoreElements();) { Association association = (Association)associationsEnum.nextElement(); fieldNames.put(association.getKey(), association.getValue()); } setAggregateToSourceFieldNames(fieldNames); }
public Object getAttributeValueFromObject(Object object) { Map sourceToTargetKeyFields = ((EISOneToOneMapping)object).getSourceToTargetKeyFields(); List associations = new ArrayList(sourceToTargetKeyFields.size()); Iterator iterator = sourceToTargetKeyFields.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry)iterator.next(); associations.add(new Association(entry.getKey(), entry.getValue())); } return associations; }