org.neodatis.odb.impl.core.layers.layer2.instance
Class InstanceBuilder

java.lang.Object
  extended by org.neodatis.odb.impl.core.layers.layer2.instance.InstanceBuilder
All Implemented Interfaces:
IInstanceBuilder
Direct Known Subclasses:
LocalInstanceBuilder, ServerInstanceBuilder

public abstract class InstanceBuilder
extends java.lang.Object
implements IInstanceBuilder

Class used to build instance from Meta Object representation. Layer 2 to Layer 1 conversion.

Author:
osmadja

Field Summary
protected  IStorageEngine engine
           
 
Constructor Summary
InstanceBuilder(IStorageEngine engine)
           
 
Method Summary
 java.lang.Object buildOneInstance(NonNativeObjectInfo objectInfo)
          The entry point to build an instance from an object meta representation
protected abstract  ISession getSession()
          Local and server InstanceBuilder must define their own getSession()
 java.lang.String getSessionId()
          Returns the session id of this instance builder (odb database identifier)
protected  java.lang.Object internalBuildArrayInstance(ArrayObjectInfo aoi)
          Builds an instance of an array
protected  java.lang.Object internalBuildCollectionInstance(CollectionObjectInfo coi)
           
protected  java.lang.Object internalBuildEnumInstance(EnumNativeObjectInfo enoi)
          Builds an insatnce of an enum
protected  java.util.Map internalBuildMapInstance(MapObjectInfo mapObjectInfo)
           
protected  java.lang.Object internalBuildOneInstance(AbstractObjectInfo objectInfo)
           
protected  java.lang.Object internalBuildOneInstance(AtomicNativeObjectInfo objectInfo)
           
protected  java.lang.Object internalBuildOneInstance(NativeObjectInfo objectInfo, java.lang.Class fieldType)
           
protected  java.lang.Object internalBuildOneInstance(NonNativeObjectInfo objectInfo)
          Main entry point to build an instance from an object meta representation
 boolean isLocal()
          To specify if instance builder is part of local StorageEngine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

engine

protected IStorageEngine engine
Constructor Detail

InstanceBuilder

public InstanceBuilder(IStorageEngine engine)
Method Detail

getSession

protected abstract ISession getSession()
Local and server InstanceBuilder must define their own getSession()


buildOneInstance

public java.lang.Object buildOneInstance(NonNativeObjectInfo objectInfo)
The entry point to build an instance from an object meta representation

Specified by:
buildOneInstance in interface IInstanceBuilder
Parameters:
objectInfo -
Returns:

internalBuildOneInstance

protected java.lang.Object internalBuildOneInstance(AbstractObjectInfo objectInfo)

internalBuildCollectionInstance

protected java.lang.Object internalBuildCollectionInstance(CollectionObjectInfo coi)

internalBuildEnumInstance

protected java.lang.Object internalBuildEnumInstance(EnumNativeObjectInfo enoi)
Builds an insatnce of an enum

Parameters:
enumClass -

internalBuildArrayInstance

protected java.lang.Object internalBuildArrayInstance(ArrayObjectInfo aoi)
Builds an instance of an array


internalBuildMapInstance

protected java.util.Map internalBuildMapInstance(MapObjectInfo mapObjectInfo)

internalBuildOneInstance

protected java.lang.Object internalBuildOneInstance(NonNativeObjectInfo objectInfo)
Main entry point to build an instance from an object meta representation


internalBuildOneInstance

protected java.lang.Object internalBuildOneInstance(NativeObjectInfo objectInfo,
                                                    java.lang.Class fieldType)

internalBuildOneInstance

protected java.lang.Object internalBuildOneInstance(AtomicNativeObjectInfo objectInfo)

getSessionId

public java.lang.String getSessionId()
Description copied from interface: IInstanceBuilder
Returns the session id of this instance builder (odb database identifier)

Specified by:
getSessionId in interface IInstanceBuilder
Returns:

isLocal

public boolean isLocal()
Description copied from interface: IInstanceBuilder
To specify if instance builder is part of local StorageEngine. In server mode, for instance, when called on the server, it will return false

Specified by:
isLocal in interface IInstanceBuilder
Returns: