org.marketcetera.ors.security
Class MultiSimpleUserQuery

java.lang.Object
  extended by org.marketcetera.persist.QueryBase
      extended by org.marketcetera.persist.MultipleEntityQuery
          extended by org.marketcetera.persist.MultiNDQuery
              extended by org.marketcetera.ors.security.MultiSimpleUserQuery
All Implemented Interfaces:
Serializable

public class MultiSimpleUserQuery
extends MultiNDQuery

A query that fetches multiple instances of users. To retrieve single instances use SingleSimpleUserQuery

Author:
anshul@marketcetera.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.marketcetera.persist.MultiNDQuery
BY_DESCRIPTION, BY_NAME
 
Fields inherited from class org.marketcetera.persist.MultipleEntityQuery
BY_LAST_UPDATED, ENTITY_ALIAS
 
Method Summary
protected  void addWhereClauses(StringBuilder queryString)
           
static MultiSimpleUserQuery all()
          Creates an instance that fetches all user instances
 int delete()
          deletes all the instances that will be fetched by this query.
 List<SimpleUser> fetch()
          Runs the query and returns the results back.
 Boolean getActiveFilter()
          A filter which, when applied, filters the users based on the value of their SimpleUser.isActive() flag.
protected  String[] getFetchJoinAttributeNames()
           
 void setActiveFilter(Boolean activeFilter)
          Sets the active flag filter
 
Methods inherited from class org.marketcetera.persist.MultiNDQuery
getDescriptionFilter, getNameFilter, setDescriptionFilter, setNameFilter
 
Methods inherited from class org.marketcetera.persist.MultipleEntityQuery
addFilterIfNotNull, addFilterIfNotNull, addFilterIfNotNull, addOrderByClauses, deleteRemote, fetchCount, fetchRemote, getEntityOrder, getFirstResult, getMaxResult, getUpdatedAfterFilter, getUpdatedBeforeFilter, isReverseOrder, preSetParameters, setEntityOrder, setFirstResult, setMaxResult, setReverseOrder, setUpdatedAfterFilter, setUpdatedBeforeFilter
 
Methods inherited from class org.marketcetera.persist.QueryBase
andWhereExpression, executeRemote, executeRemoteMultiple, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addWhereClauses

protected void addWhereClauses(StringBuilder queryString)
Overrides:
addWhereClauses in class MultiNDQuery

all

public static MultiSimpleUserQuery all()
Creates an instance that fetches all user instances

Returns:
an instance that fetches all user instances

fetch

public List<SimpleUser> fetch()
                       throws PersistenceException
Runs the query and returns the results back. All the filters set on the query are applied and if the entity order is set, the results are ordered by that entity order

Returns:
the list of users that matched the query.
Throws:
PersistenceException - if there was an error fetching the users.

delete

public int delete()
           throws PersistenceException
deletes all the instances that will be fetched by this query.

Returns:
the number of instances deleted
Throws:
PersistenceException - if there was an error deleting the instances

getActiveFilter

public Boolean getActiveFilter()
A filter which, when applied, filters the users based on the value of their SimpleUser.isActive() flag.

Returns:
the active flag filter.

setActiveFilter

public void setActiveFilter(Boolean activeFilter)
Sets the active flag filter

Parameters:
activeFilter - the filter value, can be null.

getFetchJoinAttributeNames

protected String[] getFetchJoinAttributeNames()
Specified by:
getFetchJoinAttributeNames in class QueryBase


Copyright © 2012. All Rights Reserved.