/** * INTERNAL: * Return the cached update SQL call based on the updated fields. * PERF: Allow caching of the update SQL call to avoid regeneration. */ public Vector getCachedUpdateCalls(Vector updateFields) { return (Vector) getCachedUpdateCalls().get(updateFields); }
/** * ADVANCED: * Set the size of the update call cache. * The update call cache is used to cache the update SQL to avoid regeneration. * Since every update with different fields produces different SQL, * this cache allows caching of the update SQL based on the fields being updated. * The default cache size is 10, the update call cache can be disabled through setting the size to 0. */ public void setUpdateCallCacheSize(int updateCallCacheSize) { getCachedUpdateCalls().setMaxSize(updateCallCacheSize); }
/** * ADVANCED: * Set the size of the update call cache. * The update call cache is used to cache the update SQL to avoid regeneration. * Since every update with different fields produces different SQL, * this cache allows caching of the update SQL based on the fields being updated. * The default cache size is 10, the update call cache can be disabled through setting the size to 0. */ public void setUpdateCallCacheSize(int updateCallCacheSize) { getCachedUpdateCalls().setMaxSize(updateCallCacheSize); }
/** * ADVANCED: * Return the size of the update call cache. * The update call cache is used to cache the update SQL to avoid regeneration. * Since every update with different fields produces different SQL, * this cache allows caching of the update SQL based on the fields being updated. * The default cache size is 10, the update call cache can be disabled through setting the size to 0. */ public int getUpdateCallCacheSize() { return getCachedUpdateCalls().getMaxSize(); }
/** * ADVANCED: * Return the size of the update call cache. * The update call cache is used to cache the update SQL to avoid regeneration. * Since every update with different fields produces different SQL, * this cache allows caching of the update SQL based on the fields being updated. * The default cache size is 10, the update call cache can be disabled through setting the size to 0. */ public int getUpdateCallCacheSize() { return getCachedUpdateCalls().getMaxSize(); }
/** * INTERNAL: * Return the cached update SQL call based on the updated fields. * PERF: Allow caching of the update SQL call to avoid regeneration. */ public Vector getCachedUpdateCalls(Vector updateFields) { return (Vector) getCachedUpdateCalls().get(updateFields); }
/** * INTERNAL: * Cache a clone of the update SQL calls based on the updated fields. * If the max size is reached, do not cache the call. * The call's query must be dereferenced in order to allow the GC of a related session. * PERF: Allow caching of the update SQL call to avoid regeneration. */ public void putCachedUpdateCalls(Vector updateFields, Vector updateCalls) { Vector vectorToCache = updateCalls; if (!updateCalls.isEmpty()) { int updateCallsSize = updateCalls.size(); vectorToCache = new NonSynchronizedVector(updateCallsSize); for (int i = 0; i < updateCallsSize; i++) { DatasourceCall updateCall = (DatasourceCall)updateCalls.get(i); // clone call and dereference query for DatasourceCall and EJBQLCall DatasourceCall clonedUpdateCall = (DatasourceCall) updateCall.clone(); clonedUpdateCall.setQuery(null); vectorToCache.add(clonedUpdateCall); } } getCachedUpdateCalls().put(updateFields, vectorToCache); }
/** * INTERNAL: * Cache a clone of the update SQL calls based on the updated fields. * If the max size is reached, do not cache the call. * The call's query must be dereferenced in order to allow the GC of a related session. * PERF: Allow caching of the update SQL call to avoid regeneration. */ public void putCachedUpdateCalls(Vector updateFields, Vector updateCalls) { Vector vectorToCache = updateCalls; if (!updateCalls.isEmpty()) { int updateCallsSize = updateCalls.size(); vectorToCache = new NonSynchronizedVector(updateCallsSize); for (int i = 0; i < updateCallsSize; i++) { DatasourceCall updateCall = (DatasourceCall)updateCalls.get(i); // clone call and dereference query for DatasourceCall and EJBQLCall DatasourceCall clonedUpdateCall = (DatasourceCall) updateCall.clone(); clonedUpdateCall.setQuery(null); vectorToCache.add(clonedUpdateCall); } } getCachedUpdateCalls().put(updateFields, vectorToCache); }
Vector updateCalls = getDescriptor().getQueryManager().getCachedUpdateCalls(getModifyRow().getFields());
Vector updateCalls = getDescriptor().getQueryManager().getCachedUpdateCalls(getModifyRow().getFields());
Vector updateCalls = getDescriptor().getQueryManager().getCachedUpdateCalls(getModifyRow().getFields());