org.apache.ojb.odmg
Class Image.MultipleRef

java.lang.Object
  extended by org.apache.ojb.odmg.Image
      extended by org.apache.ojb.odmg.Image.MultipleRef
All Implemented Interfaces:
CollectionProxyListener
Enclosing class:
Image

public static class Image.MultipleRef
extends Image
implements CollectionProxyListener


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.ojb.odmg.Image
Image.Field, Image.ImageException, Image.ImageListener, Image.MultipleRef, Image.SingleRef
 
Field Summary
private  CollectionDescriptor cod
           
private  Object collectionOrArray
           
private  boolean hasTransientIdentity
           
(package private) static int IS_MATERIALIZED_PROXY
           
(package private) static int IS_NORMAL_OBJECT
           
(package private) static int IS_UNMATERIALIZED_PROXY
           
private  boolean isRefreshed
           
private  Image.ImageListener listener
           
private  Map references
           
private  int status
           
 
Fields inherited from class org.apache.ojb.odmg.Image
log
 
Constructor Summary
Image.MultipleRef(Image.ImageListener listener, CollectionDescriptor cod, Object collectionOrArray)
           
 
Method Summary
 void afterLoading(CollectionProxyDefaultImpl colProxy)
          this callback is invoked after a CollectionProxy is loaded
 void beforeLoading(CollectionProxyDefaultImpl colProxy)
          this callback is invoked before a CollectionProxy is loaded
 void cleanup(boolean reuse)
           
(package private)  boolean containsReference(Identity oid)
           
(package private)  Map getIdentityReferenceObjectMap()
           
(package private)  void handleReferencedObjects(Iterator it)
           
private  boolean incommensurableProxies(Image.MultipleRef oldImage)
          To detect deleted (added) collection objects it's necessary iterate over the old (new) image collection.
private  void init()
           
(package private)  boolean isMaterializedProxy()
           
(package private)  boolean isUnmaterializedProxy()
           
 boolean modified(Image other)
          Always return 'false', because changed 1:n or m:n references do not affect the main object.
(package private)  void referenceProcessing(Image oldImage)
           
private  void refreshIdentities()
           
 String toString()
           
 
Methods inherited from class org.apache.ojb.odmg.Image
illegalImageComparison, performReferenceDetection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IS_NORMAL_OBJECT

static final int IS_NORMAL_OBJECT
See Also:
Constant Field Values

IS_MATERIALIZED_PROXY

static final int IS_MATERIALIZED_PROXY
See Also:
Constant Field Values

IS_UNMATERIALIZED_PROXY

static final int IS_UNMATERIALIZED_PROXY
See Also:
Constant Field Values

listener

private Image.ImageListener listener

cod

private final CollectionDescriptor cod

collectionOrArray

private final Object collectionOrArray

references

private Map references

status

private int status

hasTransientIdentity

private boolean hasTransientIdentity

isRefreshed

private boolean isRefreshed
Constructor Detail

Image.MultipleRef

public Image.MultipleRef(Image.ImageListener listener,
                         CollectionDescriptor cod,
                         Object collectionOrArray)
Method Detail

init

private void init()

handleReferencedObjects

void handleReferencedObjects(Iterator it)

cleanup

public void cleanup(boolean reuse)
Specified by:
cleanup in class Image

referenceProcessing

void referenceProcessing(Image oldImage)
Specified by:
referenceProcessing in class Image

incommensurableProxies

private boolean incommensurableProxies(Image.MultipleRef oldImage)
To detect deleted (added) collection objects it's necessary iterate over the old (new) image collection. If the old (new) image collection is a unmaterialized proxy we have to check if the new (old) image collection is the same proxy instance or not. E.g. if the user exchange one another the unmaterialized proxy collection objects of two main objects, then both proxy need to be materialized to assign the changed FK field values.


refreshIdentities

private void refreshIdentities()

modified

public boolean modified(Image other)
Always return 'false', because changed 1:n or m:n references do not affect the main object.

Specified by:
modified in class Image

containsReference

boolean containsReference(Identity oid)

getIdentityReferenceObjectMap

Map getIdentityReferenceObjectMap()

isMaterializedProxy

boolean isMaterializedProxy()

isUnmaterializedProxy

boolean isUnmaterializedProxy()

beforeLoading

public void beforeLoading(CollectionProxyDefaultImpl colProxy)
Description copied from interface: CollectionProxyListener
this callback is invoked before a CollectionProxy is loaded

Specified by:
beforeLoading in interface CollectionProxyListener
Parameters:
colProxy - the CollectionProxy

afterLoading

public void afterLoading(CollectionProxyDefaultImpl colProxy)
Description copied from interface: CollectionProxyListener
this callback is invoked after a CollectionProxy is loaded

Specified by:
afterLoading in interface CollectionProxyListener
Parameters:
colProxy - the CollectionProxy

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.