[Ils-source] r1332 - trunk/src/com/resolutions/ils/data

scribe at crosswire.org scribe at crosswire.org
Wed Jun 10 11:44:44 MST 2015


Author: scribe
Date: 2015-06-10 11:44:44 -0700 (Wed, 10 Jun 2015)
New Revision: 1332

Modified:
   trunk/src/com/resolutions/ils/data/Group.java
Log:
Change return type for group users to be UserProfile container


Modified: trunk/src/com/resolutions/ils/data/Group.java
===================================================================
--- trunk/src/com/resolutions/ils/data/Group.java	2015-06-08 22:46:24 UTC (rev 1331)
+++ trunk/src/com/resolutions/ils/data/Group.java	2015-06-10 18:44:44 UTC (rev 1332)
@@ -80,12 +80,13 @@
 		return (rows.size() > 0) ? (Group) rows.get(0) : null;
 	}
 
-    public Vector getGroupUsers() {
-        UserProfile query = new UserProfile();
-        query.setValue("COMPANYID", getCompanyID());
-        query.setValue("ILSGROUPID", getGroupID());
-        return query.getDataSet(LOOKUPGROUPUSERS);
-    }
+	public Vector<UserProfile> getGroupUsers() {
+		UserProfile query = new UserProfile();
+		query.setValue("COMPANYID", getCompanyID());
+		query.setValue("ILSGROUPID", getGroupID());
+		return (Vector<UserProfile>)query.getDataSet(LOOKUPGROUPUSERS);
+	}
+
     static public Vector getUserGroups(ILSSession session, int groupTypeID, int userID) {
         Group query = new Group();
         query.setValue("COMPANYID", new Integer(session.getCompanyID()));
@@ -261,10 +262,9 @@
 			xml.append(">\n");
 			xml.append(" <groupDescription>"+HTTPUtils.canonize(getGroupDescription())+"</groupDescription>\n");
 			if (detail == DETAIL_EXTRA) {
-				Vector<Object> users = getGroupUsers();
+				Vector<UserProfile> users = getGroupUsers();
 				xml.append("<userProfiles count=\""+users.size()+"\">");
-				for (Object o2 : users) {
-					UserProfile u = (UserProfile)o2;
+				for (UserProfile u: users) {
 					xml.append(u.toXML(DETAIL_HEADERONLY));
 				}
 				xml.append("</userProfiles>");




More information about the Ils-source mailing list