/** * Convenience method */ protected ClassDescriptor getReferenceDescriptor(Object attributeValue, AbstractSession session) { if (attributeValue == null) { return this.referenceDescriptor; } else { return getReferenceDescriptor(attributeValue.getClass(), session); } }
/** * Convenience method */ protected ClassDescriptor getReferenceDescriptor(Object attributeValue, AbstractSession session) { if (attributeValue == null) { return this.referenceDescriptor; } else { return getReferenceDescriptor(attributeValue.getClass(), session); } }
/** * Convenience method */ protected ClassDescriptor getReferenceDescriptor(Object attributeValue, AbstractSession session) { if (attributeValue == null) { return this.referenceDescriptor; } else { return getReferenceDescriptor(attributeValue.getClass(), session); } }
/** * Convenience method */ protected ObjectBuilder getObjectBuilder(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getObjectBuilder(); }
/** * Convenience method */ protected ObjectBuilder getObjectBuilderForClass(Class javaClass, AbstractSession session) { return getReferenceDescriptor(javaClass, session).getObjectBuilder(); }
/** * Convenience method */ protected ObjectBuilder getObjectBuilderForClass(Class javaClass, AbstractSession session) { return getReferenceDescriptor(javaClass, session).getObjectBuilder(); }
/** * Convenience method */ protected DescriptorQueryManager getQueryManager(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getQueryManager(); }
/** * Convenience method */ protected DescriptorQueryManager getQueryManager(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getQueryManager(); }
/** * Convenience method */ protected DescriptorQueryManager getQueryManager(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getQueryManager(); }
/** * Convenience method */ protected ObjectBuilder getObjectBuilder(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getObjectBuilder(); }
/** * Convenience method */ protected ObjectBuilder getObjectBuilderForClass(Class javaClass, AbstractSession session) { return getReferenceDescriptor(javaClass, session).getObjectBuilder(); }
/** * Convenience method */ protected ObjectBuilder getObjectBuilder(Object attributeValue, AbstractSession session) { return getReferenceDescriptor(attributeValue, session).getObjectBuilder(); }
/** * INTERNAL: * Indicates whether the mapping (or at least one of its nested mappings, at any nested depth) * references an entity. * To return true the mapping (or nested mapping) should be ForeignReferenceMapping with non-null and non-aggregate reference descriptor. */ @Override public boolean hasNestedIdentityReference() { if (hasNestedIdentityReference == null) { hasNestedIdentityReference = getReferenceDescriptor().hasNestedIdentityReference(true); } return hasNestedIdentityReference; }
/** * Iterate on the specified attribute value. */ protected void iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue) { iterator.iterateForAggregateMapping(attributeValue, this, getReferenceDescriptor(attributeValue, iterator.getSession())); }
/** * Iterate on the specified attribute value. */ protected void iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue) { iterator.iterateForAggregateMapping(attributeValue, this, getReferenceDescriptor(attributeValue, iterator.getSession())); }
/** * Iterate on the specified attribute value. */ protected void iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue) { iterator.iterateForAggregateMapping(attributeValue, this, getReferenceDescriptor(attributeValue, iterator.getSession())); }
/** * Return the base value that is mapped to for given field. */ public Object getParentObjectForField(DatabaseField databaseField, Object domainObject) { Object valueIntoObject = domainObject; DatabaseMapping mapping = getMappingForField(databaseField); // Drill down through the aggregate mappings to get to the direct to field mapping. while (mapping.isAggregateObjectMapping()) { valueIntoObject = mapping.getAttributeValueFromObject(valueIntoObject); mapping = ((AggregateMapping)mapping).getReferenceDescriptor().getObjectBuilder().getMappingForField(databaseField); } return valueIntoObject; }
/** * INTERNAL: * Execute a descriptor event for the specified event code. */ protected void executeEvent(int eventCode, ObjectLevelModifyQuery query) { ClassDescriptor referenceDescriptor = getReferenceDescriptor(query.getObject(), query.getSession()); // PERF: Avoid events if no listeners. if (referenceDescriptor.getEventManager().hasAnyEventListeners()) { referenceDescriptor.getEventManager().executeEvent(new org.eclipse.persistence.descriptors.DescriptorEvent(eventCode, query)); } }
/** * INTERNAL: * Execute a descriptor event for the specified event code. */ protected void executeEvent(int eventCode, ObjectLevelModifyQuery query) { ClassDescriptor referenceDescriptor = getReferenceDescriptor(query.getObject(), query.getSession()); // PERF: Avoid events if no listeners. if (referenceDescriptor.getEventManager().hasAnyEventListeners()) { referenceDescriptor.getEventManager().executeEvent(new org.eclipse.persistence.descriptors.DescriptorEvent(eventCode, query)); } }
/** * INTERNAL: * Execute a descriptor event for the specified event code. */ protected void executeEvent(int eventCode, ObjectLevelModifyQuery query) { ClassDescriptor referenceDescriptor = getReferenceDescriptor(query.getObject(), query.getSession()); // PERF: Avoid events if no listeners. if (referenceDescriptor.getEventManager().hasAnyEventListeners()) { referenceDescriptor.getEventManager().executeEvent(new org.eclipse.persistence.descriptors.DescriptorEvent(eventCode, query)); } }