/**
* Query( name = "" , standardSQL = "..." oracleSQL = "..." )
*/
public ListAccess<User> findUsersByQuery(Query orgQuery) throws Exception
{
DBObjectQuery dbQuery = new DBObjectQuery<UserImpl>(UserImpl.class);
if (orgQuery.getUserName() != null)
{
dbQuery.addLIKE("UPPER(USER_NAME)", addAsterisk(orgQuery.getUserName().toUpperCase()));
}
if (orgQuery.getFirstName() != null)
{
dbQuery.addLIKE("UPPER(FIRST_NAME)", orgQuery.getFirstName().toUpperCase());
}
if (orgQuery.getLastName() != null)
{
dbQuery.addLIKE("UPPER(LAST_NAME)", orgQuery.getLastName().toUpperCase());
}
dbQuery.addLIKE("EMAIL", orgQuery.getEmail());
dbQuery.addGT("LAST_LOGIN_TIME", orgQuery.getFromLoginDate());
dbQuery.addLT("LAST_LOGIN_TIME", orgQuery.getToLoginDate());
return new JDBCListAccess<User>(this, dbQuery.toQuery(), dbQuery.toCountQuery());
}