@Override public void close() { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.CLOSE); callFlowAgent.entityManagerMethodEnd(); } // close() not allowed on container-managed EMs. throw new IllegalStateException(); }
public void close() { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.CLOSE); callFlowAgent.entityManagerMethodEnd(); } // close() not allowed on container-managed EMs. throw new IllegalStateException(); }
@Override public boolean isOpen() { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.IS_OPEN); callFlowAgent.entityManagerMethodEnd(); } // Not relevant for container-managed EMs. Just return true. return true; }
public boolean isOpen() { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.IS_OPEN); callFlowAgent.entityManagerMethodEnd(); } // Not relevant for container-managed EMs. Just return true. return true; }
public void joinTransaction() { // Doesn't apply to the container-managed case, but all the // spec says is that an exception should be thrown if called // without a tx. doTxRequiredCheck(); if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.JOIN_TRANSACTION); callFlowAgent.entityManagerMethodEnd(); } // There's no point in calling anything on the physical // entity manager since in all tx cases it will be // correctly associated with a tx already. }
@Override public CriteriaBuilder getCriteriaBuilder() { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.GET_CRITERIA_BUILDER); } return _getDelegate().getCriteriaBuilder(); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public Query createQuery(CriteriaDelete deleteQuery) { // Please refer to comments in method createQuery(CriteriaUpdate) for the reason we do not create a QueryWrapper here. try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.CREATE_QUERY_CRITERIA_DELETE); } return _getDelegate().createQuery(deleteQuery); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
public void persist(Object entity) { doTransactionScopedTxCheck(); try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.PERSIST); } _getDelegate().persist(entity); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } // tx is required so there's no need to do any non-tx cleanup }
@Override public Object getDelegate() { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.GET_DELEGATE); } return _getDelegate(); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public Map<String, Object> getProperties() { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.GET_PROPERTIES); } return _getDelegate().getProperties(); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public Metamodel getMetamodel() { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.GET_METAMODEL); } return _getDelegate().getMetamodel(); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public EntityGraph<?> createEntityGraph(String graphName) { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.CREATE_ENTITY_GRAPH_STRING); } return _getDelegate().createEntityGraph(graphName); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public void lock(Object entity, LockModeType lockMode) { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.LOCK); } _getDelegate().lock(entity, lockMode); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public boolean isJoinedToTransaction() { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.IS_JOINED_TO_TRANSACTION); } return _getDelegate().isJoinedToTransaction(); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public void lock(Object entity, LockModeType lockMode, Map<String, Object> properties) { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.LOCK_LOCKMODETYPE_MAP); } _getDelegate().lock(entity, lockMode, properties); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public <T> T unwrap(Class<T> tClass) { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.UNWRAP); } return _getDelegate().unwrap(tClass); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public void setFlushMode(FlushModeType flushMode) { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.SET_FLUSH_MODE); } _getDelegate().setFlushMode(flushMode); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
@Override public EntityGraph<?> getEntityGraph(String graphName) { try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.GET_ENTITY_GRAPH); } return _getDelegate().getEntityGraph(graphName); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } }
public void refresh(Object entity) { doTransactionScopedTxCheck(); try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.REFRESH); } _getDelegate().refresh(entity); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } // tx is required so there's no need to do any non-tx cleanup }
public void refresh(Object entity, LockModeType lockMode) { doTransactionScopedTxCheck(); try { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodStart(EntityManagerMethod.REFRESH_OBJECT_LOCKMODETYPE); } _getDelegate().refresh(entity, lockMode); } finally { if(callFlowAgent.isEnabled()) { callFlowAgent.entityManagerMethodEnd(); } } // tx is required so there's no need to do any non-tx cleanup }