public List getBrowsableItems() { try { return CoreFactory.getGenericDelegator().findAll("Issue"); } catch (GenericEntityException e) { e.printStackTrace(); //To change body of catch statement use Options | File Templates. throw new UnsupportedOperationException(); } }
for (final GenericValue entity : CoreFactory.getGenericDelegator().findAll(entityName))
/** * 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; }