/** * INTERNAL: * Initialize the reference descriptor. */ public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (getReferenceClass() == null) { throw DescriptorException.referenceClassNotSpecified(this); } setReferenceDescriptor(session.getDescriptor(getReferenceClass())); ClassDescriptor refDescriptor = this.getReferenceDescriptor(); if (refDescriptor == null) { session.getIntegrityChecker().handleError(DescriptorException.descriptorIsMissing(getReferenceClass().getName(), this)); return; } if (refDescriptor.isDescriptorTypeAggregate()) { refDescriptor.checkInheritanceTreeAggregateSettings(session, this); } else { session.getIntegrityChecker().handleError(DescriptorException.referenceDescriptorIsNotAggregate(getReferenceClass().getName(), this)); } }
/** * INTERNAL: * Initialize the reference descriptor. */ public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (getReferenceClass() == null) { throw DescriptorException.referenceClassNotSpecified(this); } setReferenceDescriptor(session.getDescriptor(getReferenceClass())); ClassDescriptor refDescriptor = this.getReferenceDescriptor(); if (refDescriptor == null) { session.getIntegrityChecker().handleError(DescriptorException.descriptorIsMissing(getReferenceClass().getName(), this)); return; } if (refDescriptor.isDescriptorTypeAggregate()) { refDescriptor.checkInheritanceTreeAggregateSettings(session, this); } else { session.getIntegrityChecker().handleError(DescriptorException.referenceDescriptorIsNotAggregate(getReferenceClass().getName(), this)); } }
/** * INTERNAL: * Initialize the reference descriptor. */ public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if (getReferenceClass() == null) { throw DescriptorException.referenceClassNotSpecified(this); } setReferenceDescriptor(session.getDescriptor(getReferenceClass())); ClassDescriptor refDescriptor = this.getReferenceDescriptor(); if (refDescriptor == null) { session.getIntegrityChecker().handleError(DescriptorException.descriptorIsMissing(getReferenceClass().getName(), this)); return; } if (refDescriptor.isAggregateDescriptor() || refDescriptor.isAggregateCollectionDescriptor()) { refDescriptor.checkInheritanceTreeAggregateSettings(session, this); } else { session.getIntegrityChecker().handleError(DescriptorException.referenceDescriptorIsNotAggregate(getReferenceClass().getName(), this)); } }
attributeClass = ((AggregateMapping)mapping).getReferenceClass(); } else if (mapping.isVariableOneToOneMapping()) { // interfaces are unsupported in the JPA 2.0 spec for the Metamodel API if(validationEnabled) {