org.apache.ojb.odmg
Class RuntimeObject

java.lang.Object
  extended by org.apache.ojb.odmg.RuntimeObject

public final class RuntimeObject
extends Object

Helper object encapsulates common used object properties/states, help to reduce needless metadata calls.

Version:
$Id: RuntimeObject.java,v 1.1 2007-08-24 22:17:37 ewestfal Exp $
Author:
Armin Waibel

Field Summary
private  ClassDescriptor cld
           
private  IndirectionHandler handler
           
private  Identity identity
           
private  Boolean isNew
           
private  Object obj
           
private  TransactionImpl tx
           
 
Constructor Summary
RuntimeObject(Object obj, Identity oid, ClassDescriptor cld, boolean isNew, boolean isProxy)
           
RuntimeObject(Object obj, Identity identity, TransactionImpl tx, boolean isNew)
           
RuntimeObject(Object obj, TransactionImpl tx)
           
RuntimeObject(Object obj, TransactionImpl tx, boolean isNew)
           
 
Method Summary
(package private)  void doIsNewObjectCheck(TransactionImpl tx)
           
 ClassDescriptor getCld()
          Returns the associated object ClassDescriptor.
 IndirectionHandler getHandler()
           
 Identity getIdentity()
          Returns the associated object Identity.
 Object getObj()
          Return the associated persistent object.
 Object getObjMaterialized()
          Returns the materialized object (if proxy is materialized or a "normal" persistent object) or null if associated with unmaterialized proxy object.
private  void initCld(TransactionImpl tx)
           
 boolean isNew()
          Returns true if the represented object is not yet persisted.
 boolean isProxy()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

obj

private final Object obj

identity

private Identity identity

tx

private final TransactionImpl tx

isNew

private Boolean isNew

cld

private ClassDescriptor cld

handler

private IndirectionHandler handler
Constructor Detail

RuntimeObject

public RuntimeObject(Object obj,
                     TransactionImpl tx)

RuntimeObject

public RuntimeObject(Object obj,
                     TransactionImpl tx,
                     boolean isNew)

RuntimeObject

public RuntimeObject(Object obj,
                     Identity identity,
                     TransactionImpl tx,
                     boolean isNew)

RuntimeObject

public RuntimeObject(Object obj,
                     Identity oid,
                     ClassDescriptor cld,
                     boolean isNew,
                     boolean isProxy)
Method Detail

initCld

private void initCld(TransactionImpl tx)

doIsNewObjectCheck

void doIsNewObjectCheck(TransactionImpl tx)

getObj

public Object getObj()
Return the associated persistent object.


getObjMaterialized

public Object getObjMaterialized()
Returns the materialized object (if proxy is materialized or a "normal" persistent object) or null if associated with unmaterialized proxy object.


getIdentity

public Identity getIdentity()
Returns the associated object Identity.


getCld

public ClassDescriptor getCld()
Returns the associated object ClassDescriptor.


isNew

public boolean isNew()
Returns true if the represented object is not yet persisted.


isProxy

public boolean isProxy()

getHandler

public IndirectionHandler getHandler()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.