/** * Accessor for the objects currently managed by this PM in the current transaction. * @param classes Classes that we want objects for * @return The managed objects */ public Set getManagedObjects(Class... classes) { return ec.getManagedObjects(classes); }
/** * Accessor for the objects currently managed by this PM in the current transaction. * @return The managed objects */ public Set getManagedObjects() { return ec.getManagedObjects(); }
/** * Accessor for the objects currently managed by this PM in the current transaction. * @param states States that we want objects for * @return The managed objects */ public Set getManagedObjects(EnumSet states) { if (states == null) { return null; } String[] stateNames = new String[states.size()]; Iterator iter = states.iterator(); int i = 0; while (iter.hasNext()) { // Convert to strings to avoid using JDO class in Core ObjectState state = (ObjectState)iter.next(); stateNames[i++] = state.toString(); } return ec.getManagedObjects(stateNames); }
/** * Accessor for the objects currently managed by this PM in the current transaction. * @param states States that we want objects for * @param classes Classes that we want objects for * @return The managed objects */ public Set getManagedObjects(EnumSet states, Class... classes) { if (states == null) { return null; } String[] stateNames = new String[states.size()]; Iterator iter = states.iterator(); int i = 0; while (iter.hasNext()) { // Convert to strings to avoid using JDO class in Core ObjectState state = (ObjectState)iter.next(); stateNames[i++] = state.toString(); } return ec.getManagedObjects(stateNames, classes); }