/** * INTERNAL: * return whether this IndirectList has been registered with the UnitOfWork */ public boolean hasBeenRegistered() { return getValueHolder() instanceof UnitOfWorkQueryValueHolder; }
/** * INTERNAL: * return whether this IndirectList has been registered with the UnitOfWork */ public boolean hasBeenRegistered() { return getValueHolder() instanceof UnitOfWorkQueryValueHolder; }
/** * INTERNAL: * return whether this IndirectList has been registered with the UnitOfWork */ public boolean hasBeenRegistered() { return getValueHolder() instanceof UnitOfWorkQueryValueHolder; }
/** * PUBLIC: * Return whether the contents have been read from the database. */ public boolean isInstantiated() { return getValueHolder().isInstantiated(); }
/** * PUBLIC: * Return whether the contents have been read from the database. */ @Override public boolean isInstantiated() { return getValueHolder().isInstantiated(); }
/** * PUBLIC: * Return whether the contents have been read from the database. */ @Override public boolean isInstantiated() { return getValueHolder().isInstantiated(); }
protected void raiseRemoveChangeEvent(Object element, Integer index, boolean isSet) { if (hasTrackedPropertyChangeListener()) { _persistence_getPropertyChangeListener().propertyChange(new CollectionChangeEvent(this, getTrackedAttributeName(), this, element, CollectionChangeEvent.REMOVE, index, isSet, true)); } if (isRelationshipMaintenanceRequired()) { ((UnitOfWorkQueryValueHolder)getValueHolder()).updateForeignReferenceRemove(element); } }
protected void raiseAddChangeEvent(Object element, Integer index, boolean isSet) { if (hasTrackedPropertyChangeListener()) { _persistence_getPropertyChangeListener().propertyChange(new CollectionChangeEvent(this, getTrackedAttributeName(), this, element, CollectionChangeEvent.ADD, index, isSet, true)); } if (isRelationshipMaintenanceRequired()) { ((UnitOfWorkQueryValueHolder)getValueHolder()).updateForeignReferenceSet(element, null); } }
protected void raiseRemoveChangeEvent(Object element, Integer index, boolean isSet) { if (hasTrackedPropertyChangeListener()) { _persistence_getPropertyChangeListener().propertyChange(new CollectionChangeEvent(this, getTrackedAttributeName(), this, element, CollectionChangeEvent.REMOVE, index, isSet)); } if (hasBeenRegistered()) { ((UnitOfWorkQueryValueHolder)getValueHolder()).updateForeignReferenceRemove(element); } }
protected void raiseAddChangeEvent(Object element, Integer index, boolean isSet) { if (hasTrackedPropertyChangeListener()) { _persistence_getPropertyChangeListener().propertyChange(new CollectionChangeEvent(this, getTrackedAttributeName(), this, element, CollectionChangeEvent.ADD, index, isSet, true)); } if (isRelationshipMaintenanceRequired()) { ((UnitOfWorkQueryValueHolder)getValueHolder()).updateForeignReferenceSet(element, null); } }
protected void raiseRemoveChangeEvent(Object element, Integer index, boolean isSet) { if (hasTrackedPropertyChangeListener()) { _persistence_getPropertyChangeListener().propertyChange(new CollectionChangeEvent(this, getTrackedAttributeName(), this, element, CollectionChangeEvent.REMOVE, index, isSet, true)); } if (isRelationshipMaintenanceRequired()) { ((UnitOfWorkQueryValueHolder)getValueHolder()).updateForeignReferenceRemove(element); } }
/** * INTERNAL: * Return if add/remove should trigger instantiation or avoid. * Current instantiation is avoided is using change tracking. */ protected boolean shouldAvoidInstantiation() { return (!isInstantiated()) && (_persistence_getPropertyChangeListener() instanceof AttributeChangeListener) && !usesListOrderField() && ((WeavedAttributeValueHolderInterface)getValueHolder()).shouldAllowInstantiationDeferral(); }
Vector delegate = (Vector<E>)getValueHolder().getValue(); if (delegate == null) { delegate = new Vector<>(this.initialCapacity, this.capacityIncrement);
protected void raiseAddChangeEvent(Object element, Integer index, boolean isSet) { if (hasTrackedPropertyChangeListener()) { _persistence_getPropertyChangeListener().propertyChange(new CollectionChangeEvent(this, getTrackedAttributeName(), this, element, CollectionChangeEvent.ADD, index, isSet)); } if (hasBeenRegistered()) { ((UnitOfWorkQueryValueHolder)getValueHolder()).updateForeignReferenceSet(element, null); } }
/** * INTERNAL: * Return if add/remove should trigger instantiation or avoid. * Current instantiation is avoided is using change tracking. */ protected boolean shouldAvoidInstantiation() { return (!isInstantiated()) && (shouldUseLazyInstantiation()) && (_persistence_getPropertyChangeListener() instanceof AttributeChangeListener) && !usesListOrderField() && ((WeavedAttributeValueHolderInterface)getValueHolder()).shouldAllowInstantiationDeferral(); }
Vector delegate = (Vector)getValueHolder().getValue(); if (delegate == null) { delegate = new Vector(this.initialCapacity, this.capacityIncrement);
/** * INTERNAL: * Return if add/remove should trigger instantiation or avoid. * Current instantiation is avoided is using change tracking. */ protected boolean shouldAvoidInstantiation() { return (!isInstantiated()) && (shouldUseLazyInstantiation()) && (_persistence_getPropertyChangeListener() instanceof AttributeChangeListener) && !usesListOrderField() && ((WeavedAttributeValueHolderInterface)getValueHolder()).shouldAllowInstantiationDeferral(); }
Vector<E> newDelegate = (Vector<E>) getValueHolder().getValue(); if (newDelegate == null) { newDelegate = new Vector<>(this.initialCapacity, this.capacityIncrement);