org.datanucleus.store.json.fieldmanager
Class FetchFieldManager

java.lang.Object
  extended by org.datanucleus.store.fieldmanager.AbstractFieldManager
      extended by org.datanucleus.store.json.fieldmanager.FetchFieldManager
All Implemented Interfaces:
org.datanucleus.store.fieldmanager.FieldConsumer, org.datanucleus.store.fieldmanager.FieldManager, org.datanucleus.store.fieldmanager.FieldSupplier

public class FetchFieldManager
extends org.datanucleus.store.fieldmanager.AbstractFieldManager

FieldManager for fetching from JSON.


Field Summary
protected  org.datanucleus.metadata.AbstractClassMetaData acmd
           
protected  org.datanucleus.store.ExecutionContext ec
           
protected  org.datanucleus.store.ObjectProvider op
           
protected  JSONObject result
           
 
Constructor Summary
FetchFieldManager(org.datanucleus.store.ExecutionContext ec, org.datanucleus.metadata.AbstractClassMetaData acmd, JSONObject result)
           
FetchFieldManager(org.datanucleus.store.ObjectProvider op, JSONObject result)
           
 
Method Summary
 boolean fetchBooleanField(int fieldNumber)
           
 byte fetchByteField(int fieldNumber)
           
 char fetchCharField(int fieldNumber)
           
 double fetchDoubleField(int fieldNumber)
           
 float fetchFloatField(int fieldNumber)
           
 int fetchIntField(int fieldNumber)
           
 long fetchLongField(int fieldNumber)
           
 java.lang.Object fetchObjectField(int fieldNumber)
           
protected  java.lang.Object fetchObjectFieldInternal(org.datanucleus.metadata.AbstractMemberMetaData mmd, java.lang.String memberName, org.datanucleus.ClassLoaderResolver clr)
           
 short fetchShortField(int fieldNumber)
           
 java.lang.String fetchStringField(int fieldNumber)
           
protected  java.lang.Object getComGoogleAppengineApiDatastoreKeyFromJSON(JSONObject jsonobj, java.lang.Class cls, org.datanucleus.ClassLoaderResolver clr)
          Convenience method to create an AppEngine Key from a JSON object.
protected  java.lang.Object getComGoogleAppengineApiUsersUserFromJSON(JSONObject jsonobj, java.lang.Class cls, org.datanucleus.ClassLoaderResolver clr)
          Convenience method to create an AppEngine User from a JSON object.
 
Methods inherited from class org.datanucleus.store.fieldmanager.AbstractFieldManager
storeBooleanField, storeByteField, storeCharField, storeDoubleField, storeFloatField, storeIntField, storeLongField, storeObjectField, storeShortField, storeStringField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

op

protected final org.datanucleus.store.ObjectProvider op

acmd

protected final org.datanucleus.metadata.AbstractClassMetaData acmd

ec

protected final org.datanucleus.store.ExecutionContext ec

result

protected final JSONObject result
Constructor Detail

FetchFieldManager

public FetchFieldManager(org.datanucleus.store.ExecutionContext ec,
                         org.datanucleus.metadata.AbstractClassMetaData acmd,
                         JSONObject result)

FetchFieldManager

public FetchFieldManager(org.datanucleus.store.ObjectProvider op,
                         JSONObject result)
Method Detail

fetchBooleanField

public boolean fetchBooleanField(int fieldNumber)
Specified by:
fetchBooleanField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchBooleanField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchByteField

public byte fetchByteField(int fieldNumber)
Specified by:
fetchByteField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchByteField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchCharField

public char fetchCharField(int fieldNumber)
Specified by:
fetchCharField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchCharField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchDoubleField

public double fetchDoubleField(int fieldNumber)
Specified by:
fetchDoubleField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchDoubleField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchFloatField

public float fetchFloatField(int fieldNumber)
Specified by:
fetchFloatField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchFloatField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchIntField

public int fetchIntField(int fieldNumber)
Specified by:
fetchIntField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchIntField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchLongField

public long fetchLongField(int fieldNumber)
Specified by:
fetchLongField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchLongField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchShortField

public short fetchShortField(int fieldNumber)
Specified by:
fetchShortField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchShortField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchStringField

public java.lang.String fetchStringField(int fieldNumber)
Specified by:
fetchStringField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchStringField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchObjectField

public java.lang.Object fetchObjectField(int fieldNumber)
Specified by:
fetchObjectField in interface org.datanucleus.store.fieldmanager.FieldSupplier
Overrides:
fetchObjectField in class org.datanucleus.store.fieldmanager.AbstractFieldManager

fetchObjectFieldInternal

protected java.lang.Object fetchObjectFieldInternal(org.datanucleus.metadata.AbstractMemberMetaData mmd,
                                                    java.lang.String memberName,
                                                    org.datanucleus.ClassLoaderResolver clr)
                                             throws JSONException
Throws:
JSONException

getComGoogleAppengineApiUsersUserFromJSON

protected java.lang.Object getComGoogleAppengineApiUsersUserFromJSON(JSONObject jsonobj,
                                                                     java.lang.Class cls,
                                                                     org.datanucleus.ClassLoaderResolver clr)
Convenience method to create an AppEngine User from a JSON object. TODO Move this out somewhere else

Parameters:
jsonobj - The JSONObject
cls - Class being represented (User)
clr - ClassLoader resolver
Returns:
The Key

getComGoogleAppengineApiDatastoreKeyFromJSON

protected java.lang.Object getComGoogleAppengineApiDatastoreKeyFromJSON(JSONObject jsonobj,
                                                                        java.lang.Class cls,
                                                                        org.datanucleus.ClassLoaderResolver clr)
Convenience method to create an AppEngine Key from a JSON object. TODO Move this out somewhere else

Parameters:
jsonobj - The JSONObject
cls - Class being represented (Key)
clr - ClassLoader resolver
Returns:
The Key


Copyright © 2012. All Rights Reserved.