org.sourceforge.jemm.client
Class JEMMObjectFieldMapper

java.lang.Object
  extended by org.sourceforge.jemm.client.JEMMObjectFieldMapper

public class JEMMObjectFieldMapper
extends java.lang.Object

A Factory that converts and sets fields onto

Author:
Paul Keeble

Field Summary
static ClientId DEFAULT_CLIENTID
           
 
Constructor Summary
JEMMObjectFieldMapper(MethodListener listener, TypeRequestHandler typeRequestHandler)
           
 
Method Summary
 JEMMObject create(GetObjectResp resp, ClassInfo ci)
          Creates a new JEMMObject from the response along with introduced Tracked IDs.
 ObjectSyncData getSyncData(JEMMObject jo)
          Gets the Synchronisation data from a JEMMObject.
 void refreshPrimitiveState(JEMMObject jo, ObjectState state)
          Updates all the primitive values and uninitialised fields on a JEMMObject.
 java.util.Map<FieldInfo,ID> syncResponseUpdateObject(JEMMObject jo, ObjectSyncResp response)
          Updates the object with new meta and FieldData from the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CLIENTID

public static final ClientId DEFAULT_CLIENTID
Constructor Detail

JEMMObjectFieldMapper

public JEMMObjectFieldMapper(MethodListener listener,
                             TypeRequestHandler typeRequestHandler)
Method Detail

create

public JEMMObject create(GetObjectResp resp,
                         ClassInfo ci)
Creates a new JEMMObject from the response along with introduced Tracked IDs.

Parameters:
resp - The object response
ci - The class information for the object to be created
Returns:
The newly created JEMMObject

getSyncData

public ObjectSyncData getSyncData(JEMMObject jo)
Gets the Synchronisation data from a JEMMObject.

Parameters:
jo -
Returns:

syncResponseUpdateObject

public java.util.Map<FieldInfo,ID> syncResponseUpdateObject(JEMMObject jo,
                                                            ObjectSyncResp response)
Updates the object with new meta and FieldData from the response. Updates all primitive values. Updates and uninitialised Object fields with the new ID. Returns any

Parameters:
jo -
response -

refreshPrimitiveState

public void refreshPrimitiveState(JEMMObject jo,
                                  ObjectState state)
Updates all the primitive values and uninitialised fields on a JEMMObject.

Parameters:
jo -
state -


Copyright © 2009. All Rights Reserved.