/** * PUBLIC: * Add the field and the name of the method * that returns the value to be placed in said field * when the object is written to the database. * The method may take zero arguments, or it may * take a single argument of type * <code>org.eclipse.persistence.sessions.Session</code>. */ public void addFieldTransformation(DatabaseField field, String methodName) { MethodBasedFieldTransformation transformation = new MethodBasedFieldTransformation(); transformation.setField(field); transformation.setMethodName(methodName); getFieldTransformations().add(transformation); }
/** * PUBLIC: * Add the field and the name of the method * that returns the value to be placed in said field * when the object is written to the database. * The method may take zero arguments, or it may * take a single argument of type * <code>org.eclipse.persistence.sessions.Session</code>. */ public void addFieldTransformation(DatabaseField field, String methodName) { MethodBasedFieldTransformation transformation = new MethodBasedFieldTransformation(); transformation.setField(field); transformation.setMethodName(methodName); getFieldTransformations().add(transformation); }
/** * PUBLIC: * Add the field and the name of the method * that returns the value to be placed in said field * when the object is written to the database. * The method may take zero arguments, or it may * take a single argument of type * <code>org.eclipse.persistence.sessions.Session</code>. */ public void addFieldTransformation(DatabaseField field, String methodName) { MethodBasedFieldTransformation transformation = new MethodBasedFieldTransformation(); transformation.setField(field); transformation.setMethodName(methodName); getFieldTransformations().addElement(transformation); }
/** * INTERNAL: * needed for backwards compatibility */ public void setFieldNameToMethodNameAssociations(Vector associations) { setFieldTransformations(org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(associations.size())); for (Iterator source = associations.iterator(); source.hasNext();) { Association ass = (Association)source.next(); MethodBasedFieldTransformation tf = new MethodBasedFieldTransformation(); tf.setField(new DatabaseField((String)ass.getKey())); tf.setMethodName((String)ass.getValue()); getFieldTransformations().add(tf); } }
/** * INTERNAL: * needed for backwards compatibility */ public void setFieldNameToMethodNameAssociations(Vector associations) { setFieldTransformations(org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(associations.size())); for (Iterator source = associations.iterator(); source.hasNext();) { Association ass = (Association)source.next(); MethodBasedFieldTransformation tf = new MethodBasedFieldTransformation(); tf.setField(new DatabaseField((String)ass.getKey())); tf.setMethodName((String)ass.getValue()); getFieldTransformations().add(tf); } }
/** * INTERNAL: * needed for backwards compatibility */ public void setFieldNameToMethodNameAssociations(Vector associations) { setFieldTransformations(org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(associations.size())); for (Iterator source = associations.iterator(); source.hasNext();) { Association ass = (Association)source.next(); MethodBasedFieldTransformation tf = new MethodBasedFieldTransformation(); tf.setField(new DatabaseField((String)ass.getKey())); tf.setMethodName((String)ass.getValue()); getFieldTransformations().addElement(tf); } }