/** * 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) this.cachedUpdateCalls.get(updateFields); }
/** * INTERNAL: * Return the cached SQL call for the expression query. * PERF: Allow caching of expression query SQL call to avoid regeneration. */ public DatabaseQuery getCachedExpressionQuery(DatabaseQuery query) { return (DatabaseQuery)this.cachedExpressionQueries.get(query); }
/** * INTERNAL: * Return the cached SQL call for the expression query. * PERF: Allow caching of expression query SQL call to avoid regeneration. */ public DatabaseQuery getCachedExpressionQuery(DatabaseQuery query) { return (DatabaseQuery) getCachedExpressionQueries().get(query); }
/** * 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: * 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: * Return the cached SQL call for the expression query. * PERF: Allow caching of expression query SQL call to avoid regeneration. */ public DatabaseQuery getCachedExpressionQuery(DatabaseQuery query) { return (DatabaseQuery) getCachedExpressionQueries().get(query); }
/** * Populate the query using the information retrieved from parsing the JPQL. */ public void populateQuery(String jpqlString, ObjectLevelReadQuery query, AbstractSession session) { // PERF: Check if the JPQL has already been parsed. // Only allow queries with default properties to be parse cached. boolean isCacheable = query.isDefaultPropertiesQuery(); DatabaseQuery cachedQuery = null; if (isCacheable) { cachedQuery = (DatabaseQuery)session.getProject().getJPQLParseCache().get(jpqlString); } if ((cachedQuery == null) || (!cachedQuery.isPrepared()) || (cachedQuery.getClass() != query.getClass())) { JPQLParser parser = parseEJBQLString(jpqlString); JPQLParseTree parseTree = parser.getParseTree(); parseTree.populateQuery(query, session); if (isCacheable) { session.getProject().getJPQLParseCache().put(jpqlString, query); } } else { query.prepareFromQuery(cachedQuery); query.setIsPrepared(true); } }
/** * Populate the query using the information retrieved from parsing the JPQL. */ public void populateQuery(String jpqlString, ObjectLevelReadQuery query, AbstractSession session) { // PERF: Check if the JPQL has already been parsed. // Only allow queries with default properties to be parse cached. boolean isCacheable = query.isDefaultPropertiesQuery(); DatabaseQuery cachedQuery = null; if (isCacheable) { cachedQuery = (DatabaseQuery)session.getProject().getJPQLParseCache().get(jpqlString); } if ((cachedQuery == null) || (!cachedQuery.isPrepared()) || (cachedQuery.getClass() != query.getClass())) { JPQLParser parser = parseEJBQLString(jpqlString); JPQLParseTree parseTree = parser.getParseTree(); parseTree.populateQuery(query, session); if (isCacheable) { session.getProject().getJPQLParseCache().put(jpqlString, query); } } else { query.prepareFromQuery(cachedQuery); query.setIsPrepared(true); } }
/** * Populate the query using the information retrieved from parsing the JPQL. */ public void populateQuery(String jpqlString, ObjectLevelReadQuery query, AbstractSession session) { // PERF: Check if the JPQL has already been parsed. // Only allow queries with default properties to be parse cached. boolean isCacheable = query.isDefaultPropertiesQuery(); DatabaseQuery cachedQuery = null; if (isCacheable) { cachedQuery = (DatabaseQuery)session.getProject().getJPQLParseCache().get(jpqlString); } if ((cachedQuery == null) || (!cachedQuery.isPrepared()) || (cachedQuery.getClass() != query.getClass())) { JPQLParser parser = parseEJBQLString(jpqlString); JPQLParseTree parseTree = parser.getParseTree(); parseTree.populateQuery(query, session); if (isCacheable) { session.getProject().getJPQLParseCache().put(jpqlString, query); } } else { query.prepareFromQuery(cachedQuery); query.setIsPrepared(true); } }
databaseQuery = (DatabaseQuery) session.getProject().getJPQLParseCache().get(jpqlQuery);