/** * Gets the jpa server session. * * @return the jpa server session */ public DatabaseSession getServerSession() { // Fix for bug 390786 - JPA-RS: ClassCastException retrieving metadata for Composite Persistence Unit return JpaHelper.getDatabaseSession(emf); }
/** * Gets the jpa server session. * * @return the jpa server session */ public DatabaseSession getServerSession() { // Fix for bug 390786 - JPA-RS: ClassCastException retrieving metadata for Composite Persistence Unit return JpaHelper.getDatabaseSession(emf); }
public MetamodelImpl(EntityManagerFactory emf) { // Create a new Metamodel using the EclipseLink session on the EMF this(((AbstractSession)JpaHelper.getDatabaseSession(emf))); }
/** * Does exist. * * @param tenantId the tenant id * @param entity the entity * @return true, if successful */ public boolean doesExist(Map<String, String> tenantId, Object entity) { DatabaseSession session = JpaHelper.getDatabaseSession(getEmf()); return session.doesObjectExist(entity); }
/** * Does exist. * * @param tenantId the tenant id * @param entity the entity * @return true, if successful */ public boolean doesExist(Map<String, String> tenantId, Object entity) { DatabaseSession session = JpaHelper.getDatabaseSession(getEmf()); return session.doesObjectExist(entity); }
if (persistenceWeavedRest != null) { ClassDescriptor descriptor = context.getJAXBDescriptorForClass(persistenceWeavedRest.getClass()); if (persistenceWeavedRest instanceof FetchGroupTracker && JpaHelper.getDatabaseSession(context.getEmf()).doesObjectExist(persistenceWeavedRest)) { if (context.doesExist(null, persistenceWeavedRest)) { FetchGroup fetchGroup = new FetchGroup();
if (persistenceWeavedRest != null) { ClassDescriptor descriptor = context.getJAXBDescriptorForClass(persistenceWeavedRest.getClass()); if (persistenceWeavedRest instanceof FetchGroupTracker && JpaHelper.getDatabaseSession(context.getEmf()).doesObjectExist(persistenceWeavedRest)) { if (context.doesExist(null, persistenceWeavedRest)) { FetchGroup fetchGroup = new FetchGroup();
((FetchGroupTracker) entity)._persistence_setSession(JpaHelper.getDatabaseSession(context.getEmf()));
((FetchGroupTracker) entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf())); } else if (descriptor.hasRelationships()) { for (DatabaseMapping mapping : descriptor.getMappings()) {
((FetchGroupTracker) entity)._persistence_setSession(JpaHelper.getDatabaseSession(context.getEmf()));
((FetchGroupTracker) entity)._persistence_setSession(JpaHelper.getDatabaseSession(getEmf())); } else if (descriptor.hasRelationships()) { for (DatabaseMapping mapping : descriptor.getMappings()) {