public void putInAllCache(String entityName, List values) { if (entityName == null || values == null) return; ModelEntity entity = this.getModelEntity(entityName); this.putInAllCache(entity, values); }
public void putInAllCache(String entityName, List values) { if (entityName == null || values == null) return; ModelEntity entity = this.getModelEntity(entityName); this.putInAllCache(entity, values); }
public void putInAllCache(final String entityName, final List<? extends GenericValue> values) { checkIfLocked(); if (entityName == null || values == null) { return; } final ModelEntity entity = getModelEntity(entityName); putInAllCache(entity, values); }
/** * Finds all Generic entities, looking first in the cache; uses orderBy for * lookup, but only keys results on the entityName and fields. * * @param entityName The Name of the Entity as defined in the entity XML file * @param orderBy The fields of the named entity by which to order the * query; optionally add " ASC" for ascending or " DESC" for descending * @return all Generic entities */ public List<GenericValue> findAllCache(final String entityName, final List<String> orderBy) throws GenericEntityException { checkIfLocked(); List<GenericValue> lst = getFromAllCache(entityName); if (lst == null) { lst = findAll(entityName, orderBy); if (lst != null) { putInAllCache(entityName, lst); } } return lst; }
/** Finds all Generic entities, looking first in the cache; uses orderBy for lookup, but only keys results on the entityName and fields *@param entityName The Name of the Entity as defined in the entity XML file *@param orderBy The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending *@return List containing all Generic entities */ public List findAllCache(String entityName, List orderBy) throws GenericEntityException { GenericValue dummyValue = makeValue(entityName, null); Map ecaEventMap = this.getEcaEntityEventMap(entityName); this.evalEcaRules(EntityEcaHandler.EV_CACHE_CHECK, EntityEcaHandler.OP_FIND, dummyValue, ecaEventMap, (ecaEventMap == null), false); List lst = this.getFromAllCache(entityName); if (lst == null) { lst = findAll(entityName, orderBy); if (lst != null) { this.evalEcaRules(EntityEcaHandler.EV_CACHE_PUT, EntityEcaHandler.OP_FIND, dummyValue, ecaEventMap, (ecaEventMap == null), false); this.putInAllCache(entityName, lst); } } return lst; }
/** Finds all Generic entities, looking first in the cache; uses orderBy for lookup, but only keys results on the entityName and fields *@param entityName The Name of the Entity as defined in the entity XML file *@param orderBy The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending *@return List containing all Generic entities */ public List findAllCache(String entityName, List orderBy) throws GenericEntityException { GenericValue dummyValue = makeValue(entityName, null); Map ecaEventMap = this.getEcaEntityEventMap(entityName); this.evalEcaRules(EntityEcaHandler.EV_CACHE_CHECK, EntityEcaHandler.OP_FIND, dummyValue, ecaEventMap, (ecaEventMap == null), false); List lst = this.getFromAllCache(entityName); if (lst == null) { lst = findAll(entityName, orderBy); if (lst != null) { this.evalEcaRules(EntityEcaHandler.EV_CACHE_PUT, EntityEcaHandler.OP_FIND, dummyValue, ecaEventMap, (ecaEventMap == null), false); this.putInAllCache(entityName, lst); } } return lst; }