public int size() { return this.entryMap.getAllKeys(this.category).size(); }
/** Remove all entries from the cache. */ public void flush() { Collection keys = this.entryMap.getAllKeys(this.category); // Notify the entries of their removal Iterator iter = keys.iterator(); while (iter.hasNext()) { Serializable key = (Serializable) iter.next(); TimedEntry entry = (TimedEntry) this.entryMap.get(this.category, key); entry.destroy(); } }
/** * This method is called when collections of entities are to be found. The * persistence manager must find out whether the wanted instances are * available in the persistence store, and if so it must return a * collection of primaryKeys. * * @param finderMethod the find method in the home interface that was * called * @param args any finder parameters * @param instance the instance to use for the finder call * @return an primary key collection representing the found * entities * * @throws java.rmi.RemoteException thrown if some system exception occurs * @throws javax.ejb.FinderException thrown if some heuristic problem occurs */ public Collection findEntities (Method finderMethod, Object[] args, EntityEnterpriseContext instance, GenericEntityObjectFactory factory) throws Exception { Collection results = Collections.EMPTY_LIST; if (finderMethod.getName ().equals ("findAll")) { Collection tmpColl = this.ds.getAllKeys (DS_CATEGORY); if (tmpColl != null) results = GenericEntityObjectFactory.UTIL.getEntityCollection(factory, tmpColl); } return results; }
Collection<?> coll = ds.getAllKeys(this.RPC_HANDLER_NAME); if (coll == null)