checkIOType(identityType);
checkControls(controls);
PageSearchControl pageSearchControl = null;
SortByNameSearchControl sortSearchControl = null;
AttributeFilterSearchControl attributeFilterControl = null;
NameFilterSearchControl nameFilterSearchControl = null;
if (controls != null)
{
for (IdentityObjectSearchControl control : controls)
{
if (control instanceof PageSearchControl)
{
pageSearchControl = (PageSearchControl)control;
}
else if (control instanceof SortByNameSearchControl)
{
sortSearchControl = (SortByNameSearchControl)control;
}
else if (control instanceof AttributeFilterSearchControl)
{
attributeFilterControl = (AttributeFilterSearchControl)control;
}
else if (control instanceof NameFilterSearchControl)
{
nameFilterSearchControl = (NameFilterSearchControl)control;
}
}
}
HibernateIdentityObjectType hibernateType = getHibernateIdentityObjectType(ctx, identityType);
List<IdentityObject> results;
Session hibernateSession = getHibernateSession(ctx);
try
{
Query q = null;
if (sortSearchControl != null)
{
if (sortSearchControl.isAscending())
{
q = hibernateSession.createQuery(HibernateIdentityObject.findIdentityObjectsByTypeOrderedByNameAsc);
}
else
{