}
ps.close();
}
catch( SQLException e )
{
throw new NoSuchPrincipalException( e.getMessage() );
}
finally
{
try
{
if( conn != null ) conn.close();
}
catch( Exception e )
{
}
}
if( !found )
{
throw new NoSuchPrincipalException( "Could not find group in database!" );
}
if( !unique )
{
throw new NoSuchPrincipalException( "More than one group in database!" );
}
return group;
}