/** * @deprecated use {@link JPAFacadeHelper} instead. This method pierces * the published-API boundary, as does the JPAFacadeHelper utilization. */ public static OpenJPAEntityManager toEntityManager( org.apache.openjpa.kernel.Broker broker) { return JPAFacadeHelper.toEntityManager(broker); }
/** * @deprecated use {@link JPAFacadeHelper} instead. This method pierces * the published-API boundary, as does the JPAFacadeHelper utilization. */ public static OpenJPAEntityManager toEntityManager( org.apache.openjpa.kernel.Broker broker) { return JPAFacadeHelper.toEntityManager(broker); }
/** * @deprecated use {@link JPAFacadeHelper} instead. This method pierces * the published-API boundary, as does the JPAFacadeHelper utilization. */ public static OpenJPAEntityManager toEntityManager( org.apache.openjpa.kernel.Broker broker) { return JPAFacadeHelper.toEntityManager(broker); }
/** * @deprecated use {@link JPAFacadeHelper} instead. This method pierces * the published-API boundary, as does the JPAFacadeHelper utilization. */ public static OpenJPAEntityManager toEntityManager( org.apache.openjpa.kernel.Broker broker) { return JPAFacadeHelper.toEntityManager(broker); }
/** * @deprecated use {@link JPAFacadeHelper} instead. This method pierces * the published-API boundary, as does the JPAFacadeHelper utilization. */ public static OpenJPAEntityManager toEntityManager( org.apache.openjpa.kernel.Broker broker) { return JPAFacadeHelper.toEntityManager(broker); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the entity manager for the given object, if one can be determined * from just the object alone. This method will succeed for instances that * are enhanced, that were loaded from the database (rather than * being constructed with <code>new</code>), or that were created through * {@link OpenJPAEntityManager#createInstance}. */ public static OpenJPAEntityManager getEntityManager(Object o) { try { if (ImplHelper.isManageable(o)) { PersistenceCapable pc = ImplHelper.toPersistenceCapable(o, null); if (pc != null) return JPAFacadeHelper.toEntityManager( (Broker) pc.pcGetGenericContext()); } return null; } catch (Exception e) { throw PersistenceExceptions.toPersistenceException(e); } }
/** * Return the entity manager for the given object, if one can be determined * from just the object alone. This method will succeed for instances that * are enhanced, that were loaded from the database (rather than * being constructed with <code>new</code>), or that were created through * {@link OpenJPAEntityManager#createInstance}. */ public static OpenJPAEntityManager getEntityManager(Object o) { try { if (ImplHelper.isManageable(o)) { PersistenceCapable pc = ImplHelper.toPersistenceCapable(o, null); if (pc != null) return JPAFacadeHelper.toEntityManager( (Broker) pc.pcGetGenericContext()); } return null; } catch (Exception e) { throw PersistenceExceptions.toPersistenceException(e); } }
/** * Return the entity manager for the given object, if one can be determined * from just the object alone. This method will succeed for instances that * are enhanced, that were loaded from the database (rather than * being constructed with <code>new</code>), or that were created through * {@link OpenJPAEntityManager#createInstance}. */ public static OpenJPAEntityManager getEntityManager(Object o) { try { if (ImplHelper.isManageable(o)) { PersistenceCapable pc = ImplHelper.toPersistenceCapable(o, null); if (pc != null) return JPAFacadeHelper.toEntityManager( (Broker) pc.pcGetGenericContext()); } return null; } catch (Exception e) { throw PersistenceExceptions.toPersistenceException(e); } }
/** * Return the entity manager for the given object, if one can be determined * from just the object alone. This method will succeed for instances that * are enhanced, that were loaded from the database (rather than * being constructed with <code>new</code>), or that were created through * {@link OpenJPAEntityManager#createInstance}. */ public static OpenJPAEntityManager getEntityManager(Object o) { try { if (ImplHelper.isManageable(o)) { PersistenceCapable pc = ImplHelper.toPersistenceCapable(o, null); if (pc != null) return JPAFacadeHelper.toEntityManager( (Broker) pc.pcGetGenericContext()); } return null; } catch (Exception e) { throw PersistenceExceptions.toPersistenceException(e); } }
/** * Return the entity manager for the given object, if one can be determined * from just the object alone. This method will succeed for instances that * are enhanced, that were loaded from the database (rather than * being constructed with <code>new</code>), or that were created through * {@link OpenJPAEntityManager#createInstance}. */ public static OpenJPAEntityManager getEntityManager(Object o) { try { if (ImplHelper.isManageable(o)) { PersistenceCapable pc = ImplHelper.toPersistenceCapable(o, null); if (pc != null) return JPAFacadeHelper.toEntityManager( (Broker) pc.pcGetGenericContext()); } return null; } catch (Exception e) { throw PersistenceExceptions.toPersistenceException(e); } }