/** * INTERNAL: * Return whether the specified object is instantiated. */ public boolean objectIsInstantiated(Object object) { if (object instanceof IndirectContainer) { return ((IndirectContainer)object).isInstantiated(); } else { return true;// it must be a "real" collection } }
/** * INTERNAL: * Return whether the specified object is instantiated. */ public boolean objectIsInstantiated(Object object) { if (object instanceof IndirectContainer) { return ((IndirectContainer)object).isInstantiated(); } else { return true;// it must be a "real" collection } }
/** * INTERNAL: * Return whether the specified object is instantiated. */ public boolean objectIsInstantiated(Object object) { if (object instanceof IndirectContainer) { return ((IndirectContainer)object).isInstantiated(); } else { return true;// it must be a "real" collection } }
@Override public void write(Kryo kryo, Output output, Collection collection) { boolean isNotInstantiated = collection instanceof IndirectContainer && !((IndirectContainer) collection).isInstantiated(); output.writeBoolean(isNotInstantiated); if (!isNotInstantiated) { super.write(kryo, output, collection); } }
/** * Iterate on the indirection object for its mapping. */ public void iterateIndirectContainerForMapping(IndirectContainer container, DatabaseMapping mapping) { setCurrentMapping(mapping); setCurrentDescriptor(null); if (shouldIterateOnIndirectionObjects()) {// false by default internalIterateIndirectContainer(container); } if (shouldIterateOverUninstantiatedIndirectionObjects() || (shouldIterateOverIndirectionObjects() && container.isInstantiated())) { // force instantiation only if specified mapping.iterateOnRealAttributeValue(this, container); } else if (shouldIterateOverIndirectionObjects()) { // PERF: Allow the indirect container to iterate any cached elements. if (container instanceof IndirectCollection) { mapping.iterateOnRealAttributeValue(this, ((IndirectCollection)container).getAddedElements()); } } }
/** * Iterate on the indirection object for its mapping. */ public void iterateIndirectContainerForMapping(IndirectContainer container, DatabaseMapping mapping) { setCurrentMapping(mapping); setCurrentDescriptor(null); if (shouldIterateOnIndirectionObjects()) {// false by default internalIterateIndirectContainer(container); } if (shouldIterateOverUninstantiatedIndirectionObjects() || (shouldIterateOverIndirectionObjects() && container.isInstantiated())) { // force instantiation only if specified mapping.iterateOnRealAttributeValue(this, container); } else if (shouldIterateOverIndirectionObjects()) { // PERF: Allow the indirect container to iterate any cached elements. if (container instanceof IndirectCollection) { mapping.iterateOnRealAttributeValue(this, ((IndirectCollection)container).getAddedElements()); } } }
/** * Iterate on the indirection object for its mapping. */ public void iterateIndirectContainerForMapping(IndirectContainer container, DatabaseMapping mapping) { setCurrentMapping(mapping); setCurrentDescriptor(null); if (shouldIterateOnIndirectionObjects()) {// false by default internalIterateIndirectContainer(container); } if (shouldIterateOverUninstantiatedIndirectionObjects() || (shouldIterateOverIndirectionObjects() && container.isInstantiated())) { // force instantiation only if specified mapping.iterateOnRealAttributeValue(this, container); } else if (shouldIterateOverIndirectionObjects()) { // PERF: Allow the indirect container to iterate any cached elements. if (container instanceof IndirectCollection) { mapping.iterateOnRealAttributeValue(this, ((IndirectCollection)container).getAddedElements()); } } }
if ((!(oldParent instanceof IndirectContainer)) || ((IndirectContainer)oldParent).isInstantiated()) { if (!partner.getContainerPolicy().contains(sourceObject, oldParent, getSession())) {
if ((!(oldParent instanceof IndirectContainer)) || ((IndirectContainer)oldParent).isInstantiated()) { if (!partner.getContainerPolicy().contains(sourceObject, oldParent, getSession())) {
if ((!(oldParent instanceof IndirectContainer)) || ((IndirectContainer)oldParent).isInstantiated()) { if (!partner.getContainerPolicy().contains(sourceObject, oldParent, getSession())) {
if ((!(oldParent instanceof IndirectContainer)) || ((IndirectContainer)oldParent).isInstantiated()) { if (partner.getContainerPolicy().contains(sourceObject, oldParent, getSession())) {
if ((!(oldParent instanceof IndirectContainer)) || ((IndirectContainer)oldParent).isInstantiated()) { if (partner.getContainerPolicy().contains(sourceObject, oldParent, getSession())) {
if ((!(oldParent instanceof IndirectContainer)) || ((IndirectContainer)oldParent).isInstantiated()) { if (partner.getContainerPolicy().contains(sourceObject, oldParent, getSession())) {