public void detach(Object entity)
    {
        Node node = getPersistenceCache().getMainCache().getNodeFromCache(entity, getMetadata(entity.getClass()), this);
        if (node != null)
        {
            node.detach();
        }
    }
public void detach ( Object entity ) { Node node = getPersistenceCache ( ) . getMainCache ( ) . getNodeFromCache ( entity , getMetadata ( entity . getClass ( ) ) , this ) ; if ( node != null ) { node . detach ( ) ; } }
Remove the given entity from the persistence context, causing a managed
entity to become detached.