com.agfa.hap.sdo.implementation
Class DataObjectConverter<T>

java.lang.Object
  extended by com.agfa.hap.sdo.implementation.DataObjectConverter<T>
All Implemented Interfaces:
ObjectPropertyVisitor

public class DataObjectConverter<T>
extends java.lang.Object
implements ObjectPropertyVisitor

the same functionality as SnapshotSerializer except that this outputs to a list of DataObjects


Constructor Summary
DataObjectConverter(DataMapper<T> mapper)
           
 
Method Summary
 java.util.List<DataObject> convert(SnapshotDefinition def, java.util.Collection<? extends T> roots)
           
 void endDataObject(java.lang.Object instance, Type type)
           
protected  java.util.List<T> getInstancesForBulkProperty(Property property, SnapshotDefinition subselect)
           
protected  void processBulkProperties()
           
protected  void processBulkPropertyValue(BulkProperty bp, java.lang.Object parent, T value)
           
 void startDataObject(java.lang.Object instance, Type type)
           
 void visitBulkProperty(java.lang.Object instance, Property property, SnapshotDefinition subselect)
          Bulk properties are properties that are heavy to retrieve and as such should be visited in bulk.
 boolean visitProperty(java.lang.Object instance, Property property, java.lang.Object value)
           
 void visitProxyProperty(java.lang.Object instance, Property property, java.lang.Object identity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataObjectConverter

public DataObjectConverter(DataMapper<T> mapper)
Method Detail

endDataObject

public void endDataObject(java.lang.Object instance,
                          Type type)
                   throws java.lang.Exception
Specified by:
endDataObject in interface ObjectPropertyVisitor
Throws:
java.lang.Exception

startDataObject

public void startDataObject(java.lang.Object instance,
                            Type type)
                     throws java.lang.Exception
Specified by:
startDataObject in interface ObjectPropertyVisitor
Throws:
java.lang.Exception

visitBulkProperty

public void visitBulkProperty(java.lang.Object instance,
                              Property property,
                              SnapshotDefinition subselect)
Description copied from interface: ObjectPropertyVisitor
Bulk properties are properties that are heavy to retrieve and as such should be visited in bulk. A typical example is a property that can only be filled in by doing a query. Bulk properties are visited after all other objects have been visited.

Specified by:
visitBulkProperty in interface ObjectPropertyVisitor

getInstancesForBulkProperty

protected java.util.List<T> getInstancesForBulkProperty(Property property,
                                                        SnapshotDefinition subselect)

visitProperty

public boolean visitProperty(java.lang.Object instance,
                             Property property,
                             java.lang.Object value)
                      throws java.lang.Exception
Specified by:
visitProperty in interface ObjectPropertyVisitor
Returns:
true if value can be further visited recursively
Throws:
java.lang.Exception

visitProxyProperty

public void visitProxyProperty(java.lang.Object instance,
                               Property property,
                               java.lang.Object identity)
                        throws java.lang.Exception
Specified by:
visitProxyProperty in interface ObjectPropertyVisitor
Throws:
java.lang.Exception

convert

public java.util.List<DataObject> convert(SnapshotDefinition def,
                                          java.util.Collection<? extends T> roots)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

processBulkProperties

protected void processBulkProperties()
                              throws java.lang.Exception
Throws:
java.lang.Exception

processBulkPropertyValue

protected void processBulkPropertyValue(BulkProperty bp,
                                        java.lang.Object parent,
                                        T value)
                                 throws java.io.IOException,
                                        java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception


Copyright © 2007. All Rights Reserved.