if (principalType != null)
{
criteria.addEqualTo("type", principalType);
}
criteria.addEqualTo("domainId", getDefaultSecurityDomainId());
QueryByCriteria query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
List<JetspeedPrincipal> currentList = (List<JetspeedPrincipal>) getPersistenceBrokerTemplate().execute(new ManagedListByQueryCallback(query));
List<JetspeedPrincipal> targetList = new ArrayList<JetspeedPrincipal>(principals);
for (Iterator<JetspeedPrincipal> i = currentList.iterator(); i.hasNext(); )
{
JetspeedPrincipal current = i.next();