Cumulus4j API
(1.1.0)

org.cumulus4j.store.fieldmanager
Class FetchFieldManager

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

public class FetchFieldManager
extends AbstractFieldManager

Manager for the process of fetching a user object from the datastore, handling the translation from the DataEntry object into the users own object.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Constructor Summary
FetchFieldManager(ObjectProvider op, CryptoContext cryptoContext, ClassMeta classMeta, AbstractClassMetaData dnClassMetaData, ObjectContainer objectContainer)
           
 
Method Summary
protected  Object createPCFromEmbeddedObjectContainer(int fieldNumber, FieldMeta fieldMeta, ClassMeta embeddedClassMeta, EmbeddedObjectContainer embeddedObjectContainer)
           
 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)
           
 Object fetchObjectField(int fieldNumber)
           
protected  Object fetchObjectFieldWithRelationTypeArray(int fieldNumber, AbstractMemberMetaData mmd, FieldMeta fieldMeta, Set<Long> mappedByDataEntryIDs)
          Fetch an array of related objects (1-n-relationship).
protected  Object fetchObjectFieldWithRelationTypeCollection(int fieldNumber, AbstractMemberMetaData mmd, FieldMeta fieldMeta, Set<Long> mappedByDataEntryIDs)
          Fetch a Collection (List, Set, etc.) of related objects (1-n-relationship).
protected  Object fetchObjectFieldWithRelationTypeMap(int fieldNumber, AbstractMemberMetaData mmd, FieldMeta fieldMeta, Set<Long> mappedByDataEntryIDs)
          Fetch a Map of related objects (1-n-relationship).
protected  Object fetchObjectFieldWithRelationTypeNone(int fieldNumber, AbstractMemberMetaData mmd, FieldMeta fieldMeta)
          Fetch related objects that are not persistence-capable.
protected  Object fetchObjectFieldWithRelationTypeSingleValue(int fieldNumber, AbstractMemberMetaData mmd, FieldMeta fieldMeta, Set<Long> mappedByDataEntryIDs)
          Fetch a single related object (1-1-relationship).
 short fetchShortField(int fieldNumber)
           
 String fetchStringField(int fieldNumber)
           
protected  EncryptionHandler getEncryptionHandler()
           
protected  Object getObjectFromDataEntryID(long dataEntryID)
           
protected  long getThisDataEntryID()
           
 
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
 

Constructor Detail

FetchFieldManager

public FetchFieldManager(ObjectProvider op,
                         CryptoContext cryptoContext,
                         ClassMeta classMeta,
                         AbstractClassMetaData dnClassMetaData,
                         ObjectContainer objectContainer)
Method Detail

getEncryptionHandler

protected EncryptionHandler getEncryptionHandler()

fetchBooleanField

public boolean fetchBooleanField(int fieldNumber)
Specified by:
fetchBooleanField in interface FieldSupplier
Overrides:
fetchBooleanField in class AbstractFieldManager

fetchByteField

public byte fetchByteField(int fieldNumber)
Specified by:
fetchByteField in interface FieldSupplier
Overrides:
fetchByteField in class AbstractFieldManager

fetchCharField

public char fetchCharField(int fieldNumber)
Specified by:
fetchCharField in interface FieldSupplier
Overrides:
fetchCharField in class AbstractFieldManager

fetchDoubleField

public double fetchDoubleField(int fieldNumber)
Specified by:
fetchDoubleField in interface FieldSupplier
Overrides:
fetchDoubleField in class AbstractFieldManager

fetchFloatField

public float fetchFloatField(int fieldNumber)
Specified by:
fetchFloatField in interface FieldSupplier
Overrides:
fetchFloatField in class AbstractFieldManager

fetchIntField

public int fetchIntField(int fieldNumber)
Specified by:
fetchIntField in interface FieldSupplier
Overrides:
fetchIntField in class AbstractFieldManager

fetchLongField

public long fetchLongField(int fieldNumber)
Specified by:
fetchLongField in interface FieldSupplier
Overrides:
fetchLongField in class AbstractFieldManager

fetchShortField

public short fetchShortField(int fieldNumber)
Specified by:
fetchShortField in interface FieldSupplier
Overrides:
fetchShortField in class AbstractFieldManager

fetchStringField

public String fetchStringField(int fieldNumber)
Specified by:
fetchStringField in interface FieldSupplier
Overrides:
fetchStringField in class AbstractFieldManager

getThisDataEntryID

protected long getThisDataEntryID()

fetchObjectField

public Object fetchObjectField(int fieldNumber)
Specified by:
fetchObjectField in interface FieldSupplier
Overrides:
fetchObjectField in class AbstractFieldManager

fetchObjectFieldWithRelationTypeNone

protected Object fetchObjectFieldWithRelationTypeNone(int fieldNumber,
                                                      AbstractMemberMetaData mmd,
                                                      FieldMeta fieldMeta)
Fetch related objects that are not persistence-capable. The related objects might be single-valued, arrays, collections or maps.


fetchObjectFieldWithRelationTypeSingleValue

protected Object fetchObjectFieldWithRelationTypeSingleValue(int fieldNumber,
                                                             AbstractMemberMetaData mmd,
                                                             FieldMeta fieldMeta,
                                                             Set<Long> mappedByDataEntryIDs)
Fetch a single related object (1-1-relationship). The related object is persistence-capable.


createPCFromEmbeddedObjectContainer

protected Object createPCFromEmbeddedObjectContainer(int fieldNumber,
                                                     FieldMeta fieldMeta,
                                                     ClassMeta embeddedClassMeta,
                                                     EmbeddedObjectContainer embeddedObjectContainer)

fetchObjectFieldWithRelationTypeArray

protected Object fetchObjectFieldWithRelationTypeArray(int fieldNumber,
                                                       AbstractMemberMetaData mmd,
                                                       FieldMeta fieldMeta,
                                                       Set<Long> mappedByDataEntryIDs)
Fetch an array of related objects (1-n-relationship). The related objects are persistence-capable.


fetchObjectFieldWithRelationTypeCollection

protected Object fetchObjectFieldWithRelationTypeCollection(int fieldNumber,
                                                            AbstractMemberMetaData mmd,
                                                            FieldMeta fieldMeta,
                                                            Set<Long> mappedByDataEntryIDs)
Fetch a Collection (List, Set, etc.) of related objects (1-n-relationship). The related objects are persistence-capable.


fetchObjectFieldWithRelationTypeMap

protected Object fetchObjectFieldWithRelationTypeMap(int fieldNumber,
                                                     AbstractMemberMetaData mmd,
                                                     FieldMeta fieldMeta,
                                                     Set<Long> mappedByDataEntryIDs)
Fetch a Map of related objects (1-n-relationship). The related objects are persistence-capable.


getObjectFromDataEntryID

protected Object getObjectFromDataEntryID(long dataEntryID)

Cumulus4j API
(1.1.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.