Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Creative commons Attribution-NonCommercial license. http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
 
 package base.jee.api.sql.util;
 
public class GetGroupRoles {
	public static Set<StringgetGroupRoles(Connection cUUID uuidthrows SQLException {
		Set<Stringroles = new HashSet<>();
				"select distinct role, resource, uid "+
				"from role " +
				"where assignee_uuid=? " +
				"order by role, resource, uid");
		q.setString(1, uuid.toString());
		while(r.next()) {
			if(r.getString(3) != null) {
				roles.add(r.getString(1) + ":" + r.getString(2) + ":" + r.getString(3));
else {
				roles.add(r.getString(1));
			}
		}
		r.close();
		q.close();
		return roles;
	}
New to GrepCode? Check out our FAQ X