public Collection<UserIdCountVolumeCouple> getVolume(String spaceId, String componentId) throws Exception { int crmsCount = getCrmsCount(spaceId, componentId); List<UserIdCountVolumeCouple> result = new ArrayList<UserIdCountVolumeCouple>(crmsCount); for (int i = 0; i < crmsCount; i++) { UserIdCountVolumeCouple myCouple = new UserIdCountVolumeCouple(); myCouple.setUserId("-2"); myCouple.setCountVolume(1); result.add(myCouple); } return result; }
/** * Method declaration * * @param spaceId * @param componentId * @return * @see */ public Collection getVolume(String spaceId, String componentId) throws Exception { ArrayList myArrayList = new ArrayList(); Collection c = getPublications(spaceId, componentId); Iterator iter = c.iterator(); while (iter.hasNext()) { PublicationDetail detail = (PublicationDetail) iter.next(); UserIdCountVolumeCouple myCouple = new UserIdCountVolumeCouple(); myCouple.setUserId(detail.getCreatorId()); myCouple.setCountVolume(1); myArrayList.add(myCouple); } return myArrayList; }