/** * Return the fields handled by the mapping. */ protected Vector collectFields() { Vector fields = new Vector(1); fields.addElement(this.getField()); return fields; }
/** * Return the fields handled by the mapping. */ @Override protected Vector collectFields() { Vector fields = new Vector(1); fields.addElement(this.getField()); return fields; }
/** * Return the fields handled by the mapping. */ @Override protected Vector collectFields() { Vector fields = new Vector(1); fields.addElement(this.getField()); return fields; }
/** * INTERNAL: * Write fields needed for insert into the template with null values. */ @Override public void writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session) { if (this.isReadOnly()) { return; } record.put(this.getField(), null); }
/** * INTERNAL: * Write fields needed for insert into the template with null values. */ public void writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session) { if (this.isReadOnly()) { return; } record.put(this.getField(), null); }
/** * INTERNAL: * Write fields needed for insert into the template with null values. */ @Override public void writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session) { if (this.isReadOnly()) { return; } record.put(this.getField(), null); }
/** * INTERNAL: * The mapping is initialized with the given session. This mapping is fully initialized * after this. */ public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (getField() == null) { throw DescriptorException.fieldNameNotSetInMapping(this); } setField(getDescriptor().buildField(getField())); setFields(collectFields()); if (hasConverter()) { getConverter().initialize(this, session); } }
/** * INTERNAL: * The mapping is initialized with the given session. This mapping is fully initialized * after this. */ @Override public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (getField() == null) { throw DescriptorException.fieldNameNotSetInMapping(this); } setField(getDescriptor().buildField(getField())); setFields(collectFields()); if (hasConverter()) { getConverter().initialize(this, session); } }
/** * INTERNAL: * The mapping is initialized with the given session. This mapping is fully initialized * after this. */ @Override public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (getField() == null) { throw DescriptorException.fieldNameNotSetInMapping(this); } setField(getDescriptor().buildField(getField())); setFields(collectFields()); if (hasConverter()) { getConverter().initialize(this, session); } }
/** * INTERNAL: * Get the attribute value from the object and add the appropriate * values to the specified database row. */ public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session) throws DescriptorException { if (this.isReadOnly()) { return; } Object attributeValue = this.getAttributeValueFromObject(object); if (attributeValue == null) { row.put(this.getField(), null); return; } ContainerPolicy cp = this.getContainerPolicy(); Vector nestedRows = new Vector(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object element = cp.next(iter, session); // convert the value - if necessary if (hasConverter()) { element = getConverter().convertObjectValueToDataValue(element, session); } nestedRows.addElement(buildCompositeRow(element, session, row)); } Object fieldValue = null; if (!nestedRows.isEmpty()) { fieldValue = this.getReferenceDescriptor().buildFieldValueFromNestedRows(nestedRows, getStructureName(), session); } row.put(this.getField(), fieldValue); }
ContainerPolicy cp = this.getContainerPolicy(); Object fieldValue = row.getValues(this.getField());
Object fieldValue = row.getValues(this.getField());
Object fieldValue = row.getValues(this.getField());
name = ((AbstractCompositeObjectMapping)queryKeyExpression.getMapping()).getField().getName() + "." + name; } else if (queryKeyExpression.getMapping().isAbstractCompositeCollectionMapping()) { name = ((AbstractCompositeCollectionMapping)queryKeyExpression.getMapping()).getField().getName() + "." + name; } else if (queryKeyExpression.getMapping().isAbstractCompositeDirectCollectionMapping()) { name = ((AbstractCompositeDirectCollectionMapping)queryKeyExpression.getMapping()).getField().getName() + "." + name;