public class InterfaceInvocationHandler extends ObjectState implements MethodInterceptor(Code)
Handles calls to an interface of the object model. The interface may
be defined as a Java interface or a Java abstract class.
This class ties the notion of an object with state (ObjectState)
with the concept of the XORM Datastore Row.
dependsOn(InterfaceInvocationHandler other) Returns true if any of the references from this object resolve
to the object supplied as a parameter.
public void
enterTransaction(TransactionImpl txn) This is the only method where the txn field gets set.
All reachable collection references become transactional
under the same transaction.
intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) This method is invoked after execution, or in the case of
abstract or interface methods, instead of.
invokeGet(String field, ClassMapping returnTypeMapping, Class returnType) Returns the object associated with the given field that
is of the given return type.
This is the only method where the txn field gets set.
All reachable collection references become transactional
under the same transaction. Additionally,
persistent-non-transactional objects become persistent-clean.
exitTransaction
public boolean exitTransaction(boolean commit)(Code)
true if the handler should be detached from the transaction.
This method is invoked after execution, or in the case of
abstract or interface methods, instead of.
Parameters: proxy - this Parameters: method - Method Parameters: args - Arg array Parameters: methodProxy - the MethodProxy throws: Throwable - any exception value to return from generated method
Marks this object and all the objects it contains as persistent
(persistence by reachability). Any newly persistent objects will
be inserted into the database when the transaction is committed.
Constructs a new proxy instance for the specified interface.
The proxy will implement or extend the specified class and
also implement javax.jdo.spi.PersistenceCapable.
Returns a debug representation of this handler, in the format
[org.xorm.InterfaceInvocationHandler@xxxxxx; interface com.xyz.model.MyClass, primaryKey: {id}, status: PERSISTENT_CLEAN]