org.neodatis.odb.impl.core.layers.layer2.meta.compare
Class ObjectInfoComparator

java.lang.Object
  extended by org.neodatis.odb.impl.core.layers.layer2.meta.compare.ObjectInfoComparator
All Implemented Interfaces:
IObjectInfoComparator

public class ObjectInfoComparator
extends java.lang.Object
implements IObjectInfoComparator

Manage Object info differences. compares two object info and tells which objects in the object hierarchy has changed. This is used by the update to process to optimize it and actually update what has changed

Author:
olivier s

Field Summary
 java.util.List<ChangedAttribute> changedAttributeActions
          TODO check the interface, the two subclasses and their uses
 java.util.List<NonNativeObjectInfo> changedObjectMetaRepresentations
           
 java.util.List<ChangedObjectInfo> changes
           
 int maxObjectRecursionLevel
           
 java.util.List<NewNonNativeObjectAction> newObjectMetaRepresentations
           
 java.util.List<java.lang.Object> newObjects
           
 
Constructor Summary
ObjectInfoComparator()
           
 
Method Summary
 void clear()
           
 java.util.List<ArrayModifyElement> getArrayChanges()
           
 java.util.List<SetAttributeToNullAction> getAttributeToSetToNull()
           
 java.util.List<ChangedAttribute> getChangedAttributeActions()
           
 AbstractObjectInfo getChangedObjectMetaRepresentation(int i)
           
 java.util.List<ChangedObjectInfo> getChanges()
           
 int getMaxObjectRecursionLevel()
           
 int getNbChanges()
           
 NewNonNativeObjectAction getNewObjectMetaRepresentation(int i)
           
 java.util.List<NewNonNativeObjectAction> getNewObjectMetaRepresentations()
           
 java.util.List<java.lang.Object> getNewObjects()
           
 boolean hasChanged(AbstractObjectInfo aoi1, AbstractObjectInfo aoi2)
           
 void setChangedAttributeActions(java.util.List<ChangedAttribute> changedAttributeActions)
           
protected  void storeChangedAttributeAction(ChangedNativeAttributeAction caa)
           
protected  void storeChangedAttributeAction(ChangedObjectReferenceAttributeAction caa)
           
 boolean supportInPlaceUpdate()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

changedObjectMetaRepresentations

public java.util.List<NonNativeObjectInfo> changedObjectMetaRepresentations

changedAttributeActions

public java.util.List<ChangedAttribute> changedAttributeActions
TODO check the interface, the two subclasses and their uses


newObjects

public java.util.List<java.lang.Object> newObjects

newObjectMetaRepresentations

public java.util.List<NewNonNativeObjectAction> newObjectMetaRepresentations

changes

public java.util.List<ChangedObjectInfo> changes

maxObjectRecursionLevel

public int maxObjectRecursionLevel
Constructor Detail

ObjectInfoComparator

public ObjectInfoComparator()
Method Detail

hasChanged

public boolean hasChanged(AbstractObjectInfo aoi1,
                          AbstractObjectInfo aoi2)
Specified by:
hasChanged in interface IObjectInfoComparator

storeChangedAttributeAction

protected void storeChangedAttributeAction(ChangedNativeAttributeAction caa)

storeChangedAttributeAction

protected void storeChangedAttributeAction(ChangedObjectReferenceAttributeAction caa)

getChangedObjectMetaRepresentation

public AbstractObjectInfo getChangedObjectMetaRepresentation(int i)
Specified by:
getChangedObjectMetaRepresentation in interface IObjectInfoComparator

getChanges

public java.util.List<ChangedObjectInfo> getChanges()
Specified by:
getChanges in interface IObjectInfoComparator

getNewObjectMetaRepresentations

public java.util.List<NewNonNativeObjectAction> getNewObjectMetaRepresentations()
Specified by:
getNewObjectMetaRepresentations in interface IObjectInfoComparator

getNewObjectMetaRepresentation

public NewNonNativeObjectAction getNewObjectMetaRepresentation(int i)
Specified by:
getNewObjectMetaRepresentation in interface IObjectInfoComparator

getNewObjects

public java.util.List<java.lang.Object> getNewObjects()
Specified by:
getNewObjects in interface IObjectInfoComparator

getMaxObjectRecursionLevel

public int getMaxObjectRecursionLevel()
Specified by:
getMaxObjectRecursionLevel in interface IObjectInfoComparator

getChangedAttributeActions

public java.util.List<ChangedAttribute> getChangedAttributeActions()
Specified by:
getChangedAttributeActions in interface IObjectInfoComparator

setChangedAttributeActions

public void setChangedAttributeActions(java.util.List<ChangedAttribute> changedAttributeActions)

getAttributeToSetToNull

public java.util.List<SetAttributeToNullAction> getAttributeToSetToNull()
Specified by:
getAttributeToSetToNull in interface IObjectInfoComparator

clear

public void clear()
Specified by:
clear in interface IObjectInfoComparator

getNbChanges

public int getNbChanges()
Specified by:
getNbChanges in interface IObjectInfoComparator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getArrayChanges

public java.util.List<ArrayModifyElement> getArrayChanges()
Specified by:
getArrayChanges in interface IObjectInfoComparator

supportInPlaceUpdate

public boolean supportInPlaceUpdate()
Specified by:
supportInPlaceUpdate in interface IObjectInfoComparator