Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.application.communities
Class MembershipCriteria

    java.lang.Object
      com.bea.netuix.application.communities.MembershipCriteria

All Implemented Interfaces
  SearchCriteria, Serializable

Direct Known Subclasses:
  CommunityMembershipCriteria, MemberMembershipCriteria

    public abstract class MembershipCriteria

extends Object
implements SearchCriteria

The MembershipCriteria object is used to specify attributes used to find specific CommunityMembership objects. To use this object, construct a new instance, and call any of the `set...` methods to specify constraints on the search. Only constraints set using a `set...` method will be used during the search. All specified constraints are used in conjunction (AND rather than OR). Setting some constraints will automatically un-set others, so view the documentation for each `set...` method to understand the consequences.

For example, to specify a search criteria to find all disabled memberships in a community for users whose username begins with "A", the following would work:

     CommunityMembershipCriteria criteria = new CommunityMembershipCriteria(communityId);
     criteria.setUsername(FilterMethod.BEGINS_WITH, "A");
     criteria.setMembershipActive(false);

To specify a search criteria to find all accessible memberships for a particular member, the following would work:

     MemberMembershipCriteria criteria = new MemberMembershipCriteria(username);
     criteria.setMembershipAccessible(true);

The overview of community functionality contains a description of the community framework.

See Also
  `MemberMembershipCriteria`, `CommunityMembershipCriteria`, Serialized Form

Field Summary
`static String` | `ORDER_BY_JOIN_DATE` Constant used to indicate the field used to order query results- used in the orderBy() method.
`static String` | `ORDER_BY_LAST_ACCESS_DATE` Constant used to indicate the field used to order query results- used in the orderBy() method.
`static String` | `ORDER_BY_MEMBER_ACTIVE` Constant used to indicate the field used to order query results- used in the orderBy() method.
`static String` | `ORDER_BY_MEMBER_EXTERNAL` Constant used to indicate the field used to order query results- used in the orderBy() method.
`static String` | `ORDER_BY_MEMBERSHIP_ACTIVE` Constant used to indicate the field used to order query results- used in the orderBy() method.
`static String` | `ORDER_BY_USERNAME` Constant used to indicate the field used to order query results- used in the orderBy() method.

Method Summary
`boolean` | `getAccessRecordedCriteria()` Retrieves the access recorded criteria for the search.
`CommunityDefinitionId` | `getCommunityIdCriteria()` Retrieves the community ID criteria for the search.
`Date` | `getJoinedAfterCriteria()` Retrieves the minimum time a membership was created criteria for the search.
`Date` | `getJoinedBeforeCriteria()` Retrieves the maximum time a membership was created criteria for the search.
`Date` | `getLastAccessAfterCriteria()` Retrieves the minimum time a membership was last accessed criteria for the search.
`Date` | `getLastAccessBeforeCriteria()` Retrieves the maximum time a membership was last accessed criteria for the search.
`boolean` | `getMemberActiveCriteria()` Retrieves the member active status criteria for the search.
`boolean` | `getMemberExternalCriteria()` Retrieves the member external status criteria for the search.
`CommunityMemberId` | `getMemberIdCriteria()` Retrieves the member ID criteria for the search.
`boolean` | `getMembershipAccessibleCriteria()` Retrieves the membership accessible status criteria for the search.
`boolean` | `getMembershipActiveCriteria()` Retrieves the membership active status criteria for the search.
`MembershipCapability` | `getMembershipCapabilityCriteria()` Retrieves the membership capability criteria for the search, or null if no membership capability criteria exists.
`boolean` | `getMembershipHasCapabilityCriteria()` Determines if a membership must have or must not have a particular capability (determinable through the getMembershipCapabilityCriteria() method) to be included.
`String` | `getSortOrderField()` Returns one of the ORDER_BY_ constants indicating what field results should be sorted by, or `null` if no sort order has been specified.
`String` | `getUsernameCriteria()` Retrieves the username pattern criteria for the search.
`FilterMethod` | `getUsernameFilterMethod()` Retrieves the username filter method for the username search.
`String` | `getWebAppNameCriteria()` Retrieves the web app name criteria for the search.
`int` | `hashCode()`
`boolean` | `isAccessRecordedCriteria()` Determines if the membership having an access recorded is a criteria for the search.
`boolean` | `isCommunityIdCriteria()` Determines if Community ID is a criteria for the search.
`boolean` | `isJoinedAfterCriteria()` Determines if the time a membership was created after is a criteria for the search.
`boolean` | `isJoinedBeforeCriteria()` Determines if the time a membership was created before is a criteria for the search.
`boolean` | `isLastAccessAfterCriteria()` Determines if the time a membership was last accessed after is a criteria for the search.
`boolean` | `isLastAccessBeforeCriteria()` Determines if the time a membership was last accessed before is a criteria for the search.
`boolean` | `isMemberActiveCriteria()` Determines if member active status is a criteria for the search.
`boolean` | `isMemberExternalCriteria()` Determines if member external status is a criteria for the search.
`boolean` | `isMemberIdCriteria()` Determines if member ID is a criteria for the search.
`boolean` | `isMembershipAccessibleCriteria()` Determines if membership accessibility status is a criteria for the search.
`boolean` | `isMembershipActiveCriteria()` Determines if membership active status is a criteria for the search.
`boolean` | `isMembershipCapabilityCriteria()` Determines if a membership capability is a criteria for the search.
`boolean` | `isSortOrderAscending()` Returns `true` if the sort order for results is ascending, `false` if the sort order is descending.
`boolean` | `isUsernameCriteria()` Determines if username is a criteria for the search.
`boolean` | `isWebAppNameCriteria()` Determines if web app name is a criteria for the search.
`void` | `orderBy(String field, boolean ascending)` Used to specify the order for results to be returned.
`void` | `setAccessRecorded(boolean accessRecorded)` Specifies the last access date status a membership must have to be included.
`void` | `setJoinedAfter(Date joinedAfter)` Specifies the minimum join date a membership can have to be included.
`void` | `setJoinedBefore(Date joinedBefore)` Specifies the maximum join date a membership can have to be included.
`void` | `setLastAccessAfter(Date lastAccessAfter)` Specifies the minimum last access date a membership can have to be included.
`void` | `setLastAccessBefore(Date lastAccessBefore)` Specifies the maximum last access date a membership can have to be included.
`void` | `setMembershipAccessible(boolean accessible)` Specifies the that the membership accessibility status CommunityMembership must match to be included.
`void` | `setMembershipActive(boolean active)` Specifies the membership active status a CommunityMembership must match to be included.
`void` | `setMembershipCapability(MembershipCapability capability, boolean hasCapability)` Specifies a membership capability a membership must have or must not have to be included.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ORDER_BY_USERNAME

    public static final String ORDER_BY_USERNAME

  Constant used to indicate the field used to order query results- used in the orderBy() method.

  See Also
    Constants Summary

### ORDER_BY_MEMBER_ACTIVE

    public static final String ORDER_BY_MEMBER_ACTIVE

  Constant used to indicate the field used to order query results- used in the orderBy() method.

  See Also
    Constants Summary

### ORDER_BY_MEMBER_EXTERNAL

    public static final String ORDER_BY_MEMBER_EXTERNAL

  Constant used to indicate the field used to order query results- used in the orderBy() method.

  See Also
    Constants Summary

### ORDER_BY_MEMBERSHIP_ACTIVE

    public static final String ORDER_BY_MEMBERSHIP_ACTIVE

  Constant used to indicate the field used to order query results- used in the orderBy() method.

  See Also
    Constants Summary

### ORDER_BY_LAST_ACCESS_DATE

    public static final String ORDER_BY_LAST_ACCESS_DATE

  Constant used to indicate the field used to order query results- used in the orderBy() method.

  See Also
    Constants Summary

### ORDER_BY_JOIN_DATE

    public static final String ORDER_BY_JOIN_DATE

  Constant used to indicate the field used to order query results- used in the orderBy() method.

  See Also
    Constants Summary

Method Detail

### orderBy

    public void orderBy(String field,
                        boolean ascending)

  Used to specify the order for results to be returned. Results may only be ordered by a single field; multiple calls to this method will serve only to reset the field being ordered by.

  Parameters
    `field` - one of the ORDER_BY_ constants indicating which field to order results by, or `null` if no sorting is to be used.
    `ascending` - if `true`, results will be ordered in an ascending manner, otherwise they will be ordered in a descending manner.
  Throws
    `IllegalArgumentException` - if the `field` argument is not one of the ORDER_BY_ constants or `null`.

### getSortOrderField

    public String getSortOrderField()

  Returns one of the ORDER_BY_ constants indicating what field results should be sorted by, or `null` if no sort order has been specified.

  Returns
    one of the ORDER_BY_ constants indicating which field results should be sorted by, or `null` if no sort order has been specified.

### isSortOrderAscending

    public boolean isSortOrderAscending()

  Returns `true` if the sort order for results is ascending, `false` if the sort order is descending. Sorting is done only if the `getSortOrderField()` method does not return null.

  Returns
    `true` if the sort order for results is ascending, `false` if the sort order is descending.

### setMembershipActive

    public void setMembershipActive(boolean active)

  Specifies the membership active status a CommunityMembership must match to be included. Calling the setMembershipAccessible() method will override any setting specified for membership active status. If this method or setMembershipAccessible() is not called, membership active status is not used as a criteria for selection.

  Parameters
    `active` - if `true`, only memberships whose membership status is active will be included; if `false`, only memberships whose membership status is NOT active will be included.

### setMembershipAccessible

    public void setMembershipAccessible(boolean accessible)

  Specifies the that the membership accessibility status CommunityMembership must match to be included. Calling the this method will override any setting specified for member or membership active status.

  Parameters
    `accessible` - if `true`, only memberships which are accessible (where both member and membership status is active) will be included; if `false`, only memberships which are not accessible (where either member or membership status is disabled) will be included.

### setMembershipCapability

    public void setMembershipCapability(MembershipCapability capability,
                                        boolean hasCapability)

  Specifies a membership capability a membership must have or must not have to be included.

  Parameters
    `capability` - the MembershipCapability to filter on. If null, no capability filter is performed.
    `hasCapability` - if `true`, a membership must have the specified capability to be included; if `false`, a membership must NOT have the specified capability to be included.

### setLastAccessBefore

    public void setLastAccessBefore(Date lastAccessBefore)

  Specifies the maximum last access date a membership can have to be included. If this method is not called, or if the setAccessRecorded() method is called, or if a null argument is provided, the maximum last access date is not used as a selection criteria.

  Parameters
    `lastAccessBefore` - the maximum last access date a membership may have to be included. If null, there is no maximum last access date limit on search results.

### setLastAccessAfter

    public void setLastAccessAfter(Date lastAccessAfter)

  Specifies the minimum last access date a membership can have to be included. If this method is not called, or if the setAccessRecorded() method is called, or if a null argument is provided, the minimum last access date is not used as a selection criteria.

  Parameters
    `lastAccessAfter` - the minimum last access date a membership may have to be included. If null, there is no minimum last access date limit on search results.

### setAccessRecorded

    public void setAccessRecorded(boolean accessRecorded)

  Specifies the last access date status a membership must have to be included. Calling this method will override any specification of minimum and maximum last access dates specified in the setLastAccessBefore() or setLastAccessAfter() methods.

  Parameters
    `accessRecorded` - if `true`, only memberships for which a last access date has been recorded will be included; if `false`, only memberships with no access date recorded will be included.

### setJoinedBefore

    public void setJoinedBefore(Date joinedBefore)

  Specifies the maximum join date a membership can have to be included. If this method is not called or if a null argument is provided, the maximum join date is not used as a selection criteria.

  Parameters
    `joinedBefore` - the maximum join date a membership may have to be included. If null, there is no maximum join date limit on search results.

### setJoinedAfter

    public void setJoinedAfter(Date joinedAfter)

  Specifies the minimum join date a membership can have to be included. If this method is not called or if a null argument is provided, the minimum join date is not used as a selection criteria.

  Parameters
    `joinedAfter` - the minimum join date a membership may have to be included. If null, there is no minimum join date limit on search results.

### isCommunityIdCriteria

    public boolean isCommunityIdCriteria()

  Determines if Community ID is a criteria for the search.

  Returns
    `true` if community ID is a criteria to be used, `false` if not.

### getCommunityIdCriteria

    public CommunityDefinitionId getCommunityIdCriteria()

  Retrieves the community ID criteria for the search.

  Returns
    the community ID criteria for the search, or `null` if community ID is not a criteria in the search.

### isMemberIdCriteria

    public boolean isMemberIdCriteria()

  Determines if member ID is a criteria for the search.

  Returns
    `true` if member ID is a criteria to be used, `false` if not.

### getMemberIdCriteria

    public CommunityMemberId getMemberIdCriteria()

  Retrieves the member ID criteria for the search.

  Returns
    the member ID criteria for the search, or `null` if member ID is not a criteria in the search.

### isWebAppNameCriteria

    public boolean isWebAppNameCriteria()

  Determines if web app name is a criteria for the search.

  Returns
    `true` if web app name is a criteria to be used, `false` if not.

### getWebAppNameCriteria

    public String getWebAppNameCriteria()

  Retrieves the web app name criteria for the search.

  Returns
    the web app name criteria for the search, or `null` if web app name is not a criteria in the search.

### isUsernameCriteria

    public boolean isUsernameCriteria()

  Determines if username is a criteria for the search.

  Returns
    `true` if username is a criteria to be used, `false` if not.

### getUsernameCriteria

    public String getUsernameCriteria()

  Retrieves the username pattern criteria for the search.

  Returns
    the username pattern criteria for the search, or `null` if username is not a criteria in the search.

### getUsernameFilterMethod

    public FilterMethod getUsernameFilterMethod()

  Retrieves the username filter method for the username search.

  Returns
    the username filter method for the search, or `null` if username is not a criteria in the search.

### isMemberActiveCriteria

    public boolean isMemberActiveCriteria()

  Determines if member active status is a criteria for the search.

  Returns
    `true` if member active status is a criteria to be used, `false` if not.

### getMemberActiveCriteria

    public boolean getMemberActiveCriteria()

  Retrieves the member active status criteria for the search. Note that it is not possible to determine from this method whether the member active status is a criteria to be used; the isMemberActiveCriteria() method can be used for that.

  Returns
    the member active status criteria for the search. If the member active status is not a criteria in the search, `false` is returned. To determine whether the member active status is a criteria for the search, use the isMemberActiveCriteria() method.

### isMemberExternalCriteria

    public boolean isMemberExternalCriteria()

  Determines if member external status is a criteria for the search.

  Returns
    `true` if member external status is a criteria to be used, `false` if not.

### getMemberExternalCriteria

    public boolean getMemberExternalCriteria()

  Retrieves the member external status criteria for the search. Note that it is not possible to determine from this method whether the member external status is a criteria to be used; the isMemberExternalCriteria() method can be used for that.

  Returns
    the member external status criteria for the search. If the member external status is not a criteria in the search, `false` is returned. To determine whether the member external status is a criteria for the search, use the isMemberExternalCriteria() method.

### isMembershipActiveCriteria

    public boolean isMembershipActiveCriteria()

  Determines if membership active status is a criteria for the search.

  Returns
    `true` if membership active status is a criteria to be used, `false` if not.

### getMembershipActiveCriteria

    public boolean getMembershipActiveCriteria()

  Retrieves the membership active status criteria for the search. Note that it is not possible to determine from this method whether the membership active status is a criteria to be used; the isMembershipActiveCriteria() method can be used for that.

  Returns
    the membership active status criteria for the search. If the membership active status is not a criteria in the search, `false` is returned. To determine whether the membership active status is a criteria for the search, use the isMembershipActiveCriteria() method.

### isMembershipAccessibleCriteria

    public boolean isMembershipAccessibleCriteria()

  Determines if membership accessibility status is a criteria for the search.

  Returns
    `true` if membership accessibility status is a criteria to be used, `false` if not.

### getMembershipAccessibleCriteria

    public boolean getMembershipAccessibleCriteria()

  Retrieves the membership accessible status criteria for the search. Note that it is not possible to determine from this method whether the membership accessible status is a criteria to be used; the isMembershipAccessibleCriteria() method can be used for that.

  Returns
    the membership accessible status criteria for the search. If the membership accessible status is not a criteria in the search, `false` is returned. To determine whether the membership accessible status is a criteria for the search, use the isMembershipAccessibleCriteria() method.

### isMembershipCapabilityCriteria

    public boolean isMembershipCapabilityCriteria()

  Determines if a membership capability is a criteria for the search.

  Returns
    `true` if a membership having (or not having) a particular capability is a criteria to be used, `false` otherwise.

### getMembershipCapabilityCriteria

    public MembershipCapability getMembershipCapabilityCriteria()

  Retrieves the membership capability criteria for the search, or null if no membership capability criteria exists. Note that it is not possible to determine from this method whether the membership must have the specified capability or must not have the specified capability in order to be included; the getMembershipHasCapabilityCriteria() method may be used to determine that.

  Returns
    the membership capability criteria for the search, or null if no membership capability criteria exists.

### getMembershipHasCapabilityCriteria

    public boolean getMembershipHasCapabilityCriteria()

  Determines if a membership must have or must not have a particular capability (determinable through the getMembershipCapabilityCriteria() method) to be included. Note that it is not possible to determine from this method whether the membership capability is a criteria to be used; the isMembershipCapabilityCriteria() method can be used for that.

  Returns
    `true` if memberships must have the capability specified by the getMembershipCapabilityCriteria() method in order to be included, `false` otherwise.

### isLastAccessBeforeCriteria

    public boolean isLastAccessBeforeCriteria()

  Determines if the time a membership was last accessed before is a criteria for the search.

  Returns
    `true` if the time a membership was last accessed before is a criteria to be used, `false` if not.

### getLastAccessBeforeCriteria

    public Date getLastAccessBeforeCriteria()

  Retrieves the maximum time a membership was last accessed criteria for the search.

  Returns
    the maximum time a membership was last accessed criteria for the search, or `null` if no maximum last access time is a criteria in the search.

### isLastAccessAfterCriteria

    public boolean isLastAccessAfterCriteria()

  Determines if the time a membership was last accessed after is a criteria for the search.

  Returns
    `true` if the time a membership was last accessed after is a criteria to be used, `false` if not.

### getLastAccessAfterCriteria

    public Date getLastAccessAfterCriteria()

  Retrieves the minimum time a membership was last accessed criteria for the search.

  Returns
    the minimum time a membership was last accessed criteria for the search, or `null` if no minimum last access time is a criteria in the search.

### isAccessRecordedCriteria

    public boolean isAccessRecordedCriteria()

  Determines if the membership having an access recorded is a criteria for the search.

  Returns
    `true` if the membership having an access recorded is a criteria for the search, `false` if not.

### getAccessRecordedCriteria

    public boolean getAccessRecordedCriteria()

  Retrieves the access recorded criteria for the search. Note that it is not possible from this method to determine if access recorded is a criteria for the search; the isAccessRecordedCriteria() method may be used for that.

  Returns
    `true` if memberships must have a recorded last access time to be included in search results, `false` otherwise.

### isJoinedBeforeCriteria

    public boolean isJoinedBeforeCriteria()

  Determines if the time a membership was created before is a criteria for the search.

  Returns
    `true` if the time a membership was created before is a criteria to be used, `false` if not.

### getJoinedBeforeCriteria

    public Date getJoinedBeforeCriteria()

  Retrieves the maximum time a membership was created criteria for the search.

  Returns
    the maximum time a membership was created criteria for the search, or `null` if no maximum created time is a criteria in the search.

### isJoinedAfterCriteria

    public boolean isJoinedAfterCriteria()

  Determines if the time a membership was created after is a criteria for the search.

  Returns
    `true` if the time a membership was created after is a criteria to be used, `false` if not.

### getJoinedAfterCriteria

    public Date getJoinedAfterCriteria()

  Retrieves the minimum time a membership was created criteria for the search.

  Returns
    the minimum time a membership was created criteria for the search, or `null` if no minimum created time is a criteria in the search.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.