private void initCld(final TransactionImpl tx)
    {
        final IndirectionHandler handler = ProxyHelper.getIndirectionHandler(obj);
        if(handler != null)
        {
            this.handler = handler;
            isNew = Boolean.FALSE;
            identity = handler.getIdentity();
            if(handler.alreadyMaterialized())
            {
                cld = tx.getBroker().getClassDescriptor(handler.getRealSubject().getClass());
            }
            else
            {
                cld = tx.getBroker().getClassDescriptor(identity.getObjectsRealClass());
            }
        }
        else
        {
            cld = tx.getBroker().getClassDescriptor(obj.getClass());
        }
    }
private void initCld ( final TransactionImpl tx ) { final IndirectionHandler handler = ProxyHelper . getIndirectionHandler ( obj ) ; if ( handler != null ) { this . handler = handler ; isNew = Boolean . FALSE ; identity = handler . getIdentity ( ) ; if ( handler . alreadyMaterialized ( ) ) { cld = tx . getBroker ( ) . getClassDescriptor ( handler . getRealSubject ( ) . getClass ( ) ) ; } else { cld = tx . getBroker ( ) . getClassDescriptor ( identity . getObjectsRealClass ( ) ) ; } } else { cld = tx . getBroker ( ) . getClassDescriptor ( obj . getClass ( ) ) ; } }
/*
try to avoid needless and unused method calls to provide
best performance, thus create Identity object only if needed
and do 'is new object' check only if needed.