PreparedQueryCache getPreparedQueryCache() { return _broker.getCachePreparedQuery() ? getConfiguration().getQuerySQLCacheInstance() : null; }
PreparedQueryCache getPreparedQueryCache() { return _broker.getCachePreparedQuery() ? getConfiguration().getQuerySQLCacheInstance() : null; }
PreparedQueryCache getPreparedQueryCache() { return _broker.getCachePreparedQuery() ? getConfiguration().getQuerySQLCacheInstance() : null; }
PreparedQueryCache getPreparedQueryCache() { return _broker.getCachePreparedQuery() ? getConfiguration().getQuerySQLCacheInstance() : null; }
public boolean contains(Object entity) { assertNotCloseInvoked(); if (entity == null) return false; OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null && !ImplHelper.isManagedType(getConfiguration(), entity.getClass())) throw new ArgumentException(_loc.get("not-entity", entity.getClass()), null, null, true); return sm != null && !sm.isDeleted(); }
public boolean contains(Object entity) { assertNotCloseInvoked(); if (entity == null) return false; OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null && !ImplHelper.isManagedType(getConfiguration(), entity.getClass())) throw new ArgumentException(_loc.get("not-entity", entity.getClass()), null, null, true); return sm != null && !sm.isDeleted(); }
public boolean contains(Object entity) { assertNotCloseInvoked(); if (entity == null) return false; OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null && !ImplHelper.isManagedType(getConfiguration(), entity.getClass())) throw new ArgumentException(_loc.get("not-entity", entity.getClass()), null, null, true); return sm != null && !sm.isDeleted(); }
public boolean contains(Object entity) { assertNotCloseInvoked(); if (entity == null) return false; OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null && !ImplHelper.isManagedType(getConfiguration(), entity.getClass())) throw new ArgumentException(_loc.get("not-entity", entity.getClass()), null, null, true); return sm != null && !sm.isDeleted(); }
public boolean contains(Object entity) { assertNotCloseInvoked(); if (entity == null) return false; OpenJPAStateManager sm = _broker.getStateManager(entity); if (sm == null && !ImplHelper.isManagedType(getConfiguration(), entity.getClass())) throw new ArgumentException(_loc.get("not-entity", entity.getClass()), null, null, true); return sm != null && !sm.isDeleted(); }
public OpenJPAQuery<X> setResultClass(Class cls) { _em.assertNotCloseInvoked(); if (ImplHelper.isManagedType(_em.getConfiguration(), cls)) _query.setCandidateType(cls, true); else _query.setResultType(cls); return this; }
public OpenJPAQuery<X> setResultClass(Class cls) { _em.assertNotCloseInvoked(); if (ImplHelper.isManagedType(_em.getConfiguration(), cls)) _query.setCandidateType(cls, true); else _query.setResultType(cls); return this; }
public OpenJPAQuery<X> setResultClass(Class cls) { _em.assertNotCloseInvoked(); if (ImplHelper.isManagedType(_em.getConfiguration(), cls)) _query.setCandidateType(cls, true); else _query.setResultType(cls); return this; }
public OpenJPAQuery<X> setResultClass(Class cls) { _em.assertNotCloseInvoked(); if (ImplHelper.isManagedType(_em.getConfiguration(), cls)) _query.setCandidateType(cls, true); else _query.setResultType(cls); return this; }
public OpenJPAQuery setResultClass(Class cls) { _em.assertNotCloseInvoked(); if (ImplHelper.isManagedType(_em.getConfiguration(), cls)) _query.setCandidateType(cls, true); else _query.setResultType(cls); return this; }
/** * Sets the given property to the given value, reflectively. * * The property key is transposed to a bean-style property. * The value is converted to a type consumable by the kernel. * After requisite transformation, if the value can not be set * on either this instance or its fetch plan by reflection, * then an warning message (not an exception as per JPA specification) is issued. */ public void setProperty(String prop, Object value) { if (!setKernelProperty(this, prop, value)) { if (!setKernelProperty(this.getFetchPlan(), prop, value)) { Log log = getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("ignored-em-prop", prop, value == null ? "" : value.getClass()+":" + value)); } } } }
/** * Sets the given property to the given value, reflectively. * * The property key is transposed to a bean-style property. * The value is converted to a type consumable by the kernel. * After requisite transformation, if the value can not be set * on either this instance or its fetch plan by reflection, * then an warning message (not an exception as per JPA specification) is issued. */ public void setProperty(String prop, Object value) { if (!setKernelProperty(this, prop, value)) { if (!setKernelProperty(this.getFetchPlan(), prop, value)) { Log log = getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("ignored-em-prop", prop, value == null ? "" : value.getClass()+":" + value)); } } } }
/** * Sets the given property to the given value, reflectively. * * The property key is transposed to a bean-style property. * The value is converted to a type consumable by the kernel. * After requisite transformation, if the value can not be set * on either this instance or its fetch plan by reflection, * then an warning message (not an exception as per JPA specification) is issued. */ public void setProperty(String prop, Object value) { if (!setKernelProperty(this, prop, value)) { if (!setKernelProperty(this.getFetchPlan(), prop, value)) { Log log = getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME); if (log.isWarnEnabled()) { log.warn(_loc.get("ignored-em-prop", prop, value == null ? "" : value.getClass()+":" + value)); } } } }
@SuppressWarnings("unchecked") public <T> T detachCopy(T entity) { assertNotCloseInvoked(); Compatibility compat = this.getConfiguration(). getCompatibilityInstance(); boolean copyOnDetach = compat.getCopyOnDetach(); boolean cascadeWithDetach = compat.getCascadeWithDetach(); // Set compatibility options to get 1.x detach behavior compat.setCopyOnDetach(true); compat.setCascadeWithDetach(true); try { T t = (T)_broker.detach(entity, this); return t; } finally { // Reset compatibility options compat.setCopyOnDetach(copyOnDetach); compat.setCascadeWithDetach(cascadeWithDetach); } }
@SuppressWarnings("unchecked") public <T> T detachCopy(T entity) { assertNotCloseInvoked(); Compatibility compat = this.getConfiguration(). getCompatibilityInstance(); boolean copyOnDetach = compat.getCopyOnDetach(); boolean cascadeWithDetach = compat.getCascadeWithDetach(); // Set compatibility options to get 1.x detach behavior compat.setCopyOnDetach(true); compat.setCascadeWithDetach(true); try { T t = (T)_broker.detach(entity, this); return t; } finally { // Reset compatibility options compat.setCopyOnDetach(copyOnDetach); compat.setCascadeWithDetach(cascadeWithDetach); } }
@SuppressWarnings("unchecked") public <T> T detachCopy(T entity) { assertNotCloseInvoked(); Compatibility compat = this.getConfiguration(). getCompatibilityInstance(); boolean copyOnDetach = compat.getCopyOnDetach(); boolean cascadeWithDetach = compat.getCascadeWithDetach(); // Set compatibility options to get 1.x detach behavior compat.setCopyOnDetach(true); compat.setCascadeWithDetach(true); try { T t = (T)_broker.detach(entity, this); return t; } finally { // Reset compatibility options compat.setCopyOnDetach(copyOnDetach); compat.setCascadeWithDetach(cascadeWithDetach); } }