public FetchPlan pushFetchPlan(FetchConfiguration fc) { assertNotCloseInvoked(); _broker.lock(); try { _broker.pushFetchConfiguration(fc); return getFetchPlan(); } finally { _broker.unlock(); } }
public FetchPlan pushFetchPlan(FetchConfiguration fc) { assertNotCloseInvoked(); _broker.lock(); try { _broker.pushFetchConfiguration(fc); return getFetchPlan(); } finally { _broker.unlock(); } }
public FetchPlan pushFetchPlan(FetchConfiguration fc) { assertNotCloseInvoked(); _broker.lock(); try { _broker.pushFetchConfiguration(fc); return getFetchPlan(); } finally { _broker.unlock(); } }
public FetchPlan pushFetchPlan() { assertNotCloseInvoked(); _broker.lock(); try { _broker.pushFetchConfiguration(); return getFetchPlan(); } finally { _broker.unlock(); } }
public FetchPlan pushFetchPlan(FetchConfiguration fc) { assertNotCloseInvoked(); _broker.lock(); try { _broker.pushFetchConfiguration(fc); return getFetchPlan(); } finally { _broker.unlock(); } }
public void refresh(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(REFRESH, entity); _broker.assertWriteOperation(); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); DataCacheRetrieveMode rmode = getFetchPlan().getCacheRetrieveMode(); if (DataCacheRetrieveMode.USE.equals(rmode) || rmode == null) { getFetchPlan().setCacheRetrieveMode(DataCacheRetrieveMode.BYPASS); } try { _broker.refresh(entity, this); } finally { popFetchPlan(); } }
public void refresh(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(REFRESH, entity); _broker.assertWriteOperation(); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); DataCacheRetrieveMode rmode = getFetchPlan().getCacheRetrieveMode(); if (DataCacheRetrieveMode.USE.equals(rmode) || rmode == null) { getFetchPlan().setCacheRetrieveMode(DataCacheRetrieveMode.BYPASS); } try { _broker.refresh(entity, this); } finally { popFetchPlan(); } }
public void refresh(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(REFRESH, entity); _broker.assertWriteOperation(); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); DataCacheRetrieveMode rmode = getFetchPlan().getCacheRetrieveMode(); if (DataCacheRetrieveMode.USE.equals(rmode) || rmode == null) { getFetchPlan().setCacheRetrieveMode(DataCacheRetrieveMode.BYPASS); } try { _broker.refresh(entity, this); } finally { popFetchPlan(); } }
public void refresh(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(REFRESH, entity); _broker.assertWriteOperation(); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); DataCacheRetrieveMode rmode = getFetchPlan().getCacheRetrieveMode(); if (DataCacheRetrieveMode.USE.equals(rmode) || rmode == null) { getFetchPlan().setCacheRetrieveMode(DataCacheRetrieveMode.BYPASS); } try { _broker.refresh(entity, this); } finally { popFetchPlan(); } }
/** * 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 find(Class<T> cls, Object oid, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); try { oid = _broker.newObjectId(cls, oid); return (T) _broker.find(oid, true, this); } finally { popFetchPlan(); } }
@SuppressWarnings("unchecked") public <T> T find(Class<T> cls, Object oid, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); try { oid = _broker.newObjectId(cls, oid); return (T) _broker.find(oid, true, this); } finally { popFetchPlan(); } }
@SuppressWarnings("unchecked") public <T> T find(Class<T> cls, Object oid, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); try { oid = _broker.newObjectId(cls, oid); return (T) _broker.find(oid, true, this); } finally { popFetchPlan(); } }
@SuppressWarnings("unchecked") public <T> T find(Class<T> cls, Object oid, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, true); try { oid = _broker.newObjectId(cls, oid); return (T) _broker.find(oid, true, this); } finally { popFetchPlan(); } }
public void lock(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(LOCK, entity); _broker.assertActiveTransaction(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, false); try { _broker.lock(entity, MixedLockLevelsHelper.toLockLevel(mode), _broker.getFetchConfiguration().getLockTimeout(), this); } finally { popFetchPlan(); } }
public void lock(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(LOCK, entity); _broker.assertActiveTransaction(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, false); try { _broker.lock(entity, MixedLockLevelsHelper.toLockLevel(mode), _broker.getFetchConfiguration().getLockTimeout(), this); } finally { popFetchPlan(); } }
public void lock(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(LOCK, entity); _broker.assertActiveTransaction(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, false); try { _broker.lock(entity, MixedLockLevelsHelper.toLockLevel(mode), _broker.getFetchConfiguration().getLockTimeout(), this); } finally { popFetchPlan(); } }
public void lock(Object entity, LockModeType mode, Map<String, Object> properties) { assertNotCloseInvoked(); assertValidAttchedEntity(LOCK, entity); _broker.assertActiveTransaction(); properties = cloneProperties(properties); configureCurrentCacheModes(pushFetchPlan(), properties); configureCurrentFetchPlan(getFetchPlan(), properties, mode, false); try { _broker.lock(entity, MixedLockLevelsHelper.toLockLevel(mode), _broker.getFetchConfiguration().getLockTimeout(), this); } finally { popFetchPlan(); } }