/** * INTERNAL: * Select one object of any concrete subclass. */ @Override protected Object selectOneObject(ReadObjectQuery query) throws DescriptorException { if (this.descriptor.isAbstract()) { return null; } return super.selectOneObject(query); } }
/** * INTERNAL: * Select one object of any concrete subclass. */ @Override protected Object selectOneObject(ReadObjectQuery query) throws DescriptorException { if (this.descriptor.isAbstract()) { return null; } return super.selectOneObject(query); } }
/** * INTERNAL: * Select all objects for a concrete descriptor. */ @Override protected Object selectAllObjects(ReadAllQuery query) { if (this.descriptor.isAbstract()) { return query.getContainerPolicy().containerInstance(); } return super.selectAllObjects(query); }
/** * INTERNAL: * Select all objects for a concrete descriptor. */ @Override protected Object selectAllObjects(ReadAllQuery query) { if (this.descriptor.isAbstract()) { return query.getContainerPolicy().containerInstance(); } return super.selectAllObjects(query); }
/** * INTERNAL: * Validate that the descriptor was defined correctly. * This allows for checks to be done that require the descriptor initialization to be completed. */ protected void selfValidationAfterInitialization(AbstractSession session) throws DescriptorException { // This has to be done after, because read subclasses must be initialized. if ( (hasInheritance() && (getInheritancePolicy().shouldReadSubclasses() || isAbstract())) || hasTablePerClassPolicy() && isAbstract() ) { // Avoid building a new instance if the inheritance class is abstract. // There is an empty statement here, and this was done if anything for the // readability sake of the statement logic. } else if (session.getIntegrityChecker().shouldCheckInstantiationPolicy()) { getInstantiationPolicy().buildNewInstance(); } if (hasReturningPolicy()) { getReturningPolicy().validationAfterDescriptorInitialization(session); } getObjectBuilder().validate(session); }
/** * INTERNAL: * Validate that the descriptor was defined correctly. * This allows for checks to be done that require the descriptor initialization to be completed. */ protected void selfValidationAfterInitialization(AbstractSession session) throws DescriptorException { // This has to be done after, because read subclasses must be initialized. if ( (hasInheritance() && (getInheritancePolicy().shouldReadSubclasses() || isAbstract())) || hasTablePerClassPolicy() && isAbstract() ) { // Avoid building a new instance if the inheritance class is abstract. // There is an empty statement here, and this was done if anything for the // readability sake of the statement logic. } else if (session.getIntegrityChecker().shouldCheckInstantiationPolicy()) { getInstantiationPolicy().buildNewInstance(); } if (hasReturningPolicy()) { getReturningPolicy().validationAfterDescriptorInitialization(session); } getObjectBuilder().validate(session); }
/** * INTERNAL: * Validate that the descriptor was defined correctly. * This allows for checks to be done that require the descriptor initialization to be completed. */ protected void selfValidationAfterInitialization(AbstractSession session) throws DescriptorException { // This has to be done after, because read subclasses must be initialized. if ( (hasInheritance() && (getInheritancePolicy().shouldReadSubclasses() || isAbstract())) || hasTablePerClassPolicy() && isAbstract() ) { // Avoid building a new instance if the inheritance class is abstract. // There is an empty statement here, and this was done if anything for the // readability sake of the statement logic. } else if (session.getIntegrityChecker().shouldCheckInstantiationPolicy()) { getInstantiationPolicy().buildNewInstance(); } if (hasReturningPolicy()) { getReturningPolicy().validationAfterDescriptorInitialization(session); } getObjectBuilder().validate(session); }
if (descriptor.hasTablePerClassPolicy() && descriptor.isAbstract()) { return;
if (descriptor.hasTablePerClassPolicy() && descriptor.isAbstract()) { return;
setCopyPolicy(new PersistenceEntityCopyPolicy()); if (!isAbstract()) { try { if (this.instantiationPolicy == null) {
setCopyPolicy(new PersistenceEntityCopyPolicy()); if (!isAbstract()) { try { if (this.instantiationPolicy == null) {
setCopyPolicy(new PersistenceEntityCopyPolicy()); if (!isAbstract()) { try { if (this.instantiationPolicy == null) {
if (this.descriptor.hasTablePerClassPolicy() && this.descriptor.isAbstract()) { result = this.containerPolicy.containerInstance();
if (this.descriptor.hasTablePerClassPolicy() && this.descriptor.isAbstract()) { result = this.containerPolicy.containerInstance();
Object returnValue = this.descriptor.getInterfacePolicy().selectOneObjectUsingMultipleTableSubclassRead(this); if (this.descriptor.hasTablePerClassPolicy() && (!this.descriptor.isAbstract()) && (returnValue == null)) {
Object returnValue = this.descriptor.getInterfacePolicy().selectOneObjectUsingMultipleTableSubclassRead(this); if (this.descriptor.hasTablePerClassPolicy() && (!this.descriptor.isAbstract()) && (returnValue == null)) {