Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. 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 CommunityMembershipCriteria

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

All Implemented Interfaces
  SearchCriteria, Serializable

    public class CommunityMembershipCriteria

extends MembershipCriteria

The CommunityMembershipCriteria object is used to specify attributes used to find specific CommunityMembership objects from a particular community. 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);

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

See Also
  `MembershipCriteria`, `MemberMembershipCriteria`, Serialized Form

Field Summary

Fields inherited from class com.bea.netuix.application.communities.MembershipCriteria
`ORDER_BY_JOIN_DATE, ORDER_BY_LAST_ACCESS_DATE, ORDER_BY_MEMBER_ACTIVE, ORDER_BY_MEMBER_EXTERNAL, ORDER_BY_MEMBERSHIP_ACTIVE, ORDER_BY_USERNAME`

Constructor Summary
`CommunityMembershipCriteria(CommunityDefinitionId communityId)` Constructor for a CommunityMembershipCriteria object which creates a unconstrained search criteria-- by default, all criteria are not used during a search, and all CommunityMemberships will be selected.

Method Summary
`CommunityMembershipCriteria` | `copy()` Creates a copy of this CommunityMembershipCriteria object.
`boolean` | `equals(Object o)`
`void` | `setMemberActive(boolean active)` Specifies the member active status a CommunityMembership must match to be included.
`void` | `setMemberExternal(boolean external)` Specifies the member external status a membership must match to be included.
`void` | `setUsername(String usernamePattern, FilterMethod filterMethod)` Specifies the username pattern a CommunityMembership must match to be included.
`String` | `toString()`

Methods inherited from class com.bea.netuix.application.communities.MembershipCriteria
`getAccessRecordedCriteria, getCommunityIdCriteria, getJoinedAfterCriteria, getJoinedBeforeCriteria, getLastAccessAfterCriteria, getLastAccessBeforeCriteria, getMemberActiveCriteria, getMemberExternalCriteria, getMemberIdCriteria, getMembershipAccessibleCriteria, getMembershipActiveCriteria, getMembershipCapabilityCriteria, getMembershipHasCapabilityCriteria, getSortOrderField, getUsernameCriteria, getUsernameFilterMethod, getWebAppNameCriteria, hashCode, isAccessRecordedCriteria, isCommunityIdCriteria, isJoinedAfterCriteria, isJoinedBeforeCriteria, isLastAccessAfterCriteria, isLastAccessBeforeCriteria, isMemberActiveCriteria, isMemberExternalCriteria, isMemberIdCriteria, isMembershipAccessibleCriteria, isMembershipActiveCriteria, isMembershipCapabilityCriteria, isSortOrderAscending, isUsernameCriteria, isWebAppNameCriteria, orderBy, setAccessRecorded, setJoinedAfter, setJoinedBefore, setLastAccessAfter, setLastAccessBefore, setMembershipAccessible, setMembershipActive, setMembershipCapability`

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

Constructor Detail

### CommunityMembershipCriteria

    public CommunityMembershipCriteria(CommunityDefinitionId communityId)

  Constructor for a CommunityMembershipCriteria object which creates a unconstrained search criteria-- by default, all criteria are not used during a search, and all CommunityMemberships will be selected. To narrow the search, call the appropriate set... methods to specify what criteria should be used. Unless a set... method is called to specify a criteria, the criteria is NOT used in the search.

  Parameters
    `communityId` - the community to search for memberships in.

Method Detail

### setUsername

    public void setUsername(String usernamePattern,
                            FilterMethod filterMethod)

  Specifies the username pattern a CommunityMembership must match to be included. If this method is not called, or if `null` is used as the argument, username is not used as a criteria for selecting memberships.

  Parameters
    `usernamePattern` - the username pattern memberships must match to be included. If null, username is not used as a criteria for selection.
    `filterMethod` - the filter method to use for the username. FilterMethod.BEGINS_WITH indicates that the username must begin with the specified pattern. FilterMethod.CONTAINS indicates that the username must contain the specified pattern. FilterMethod.ENDS_WITH indicates that the username must end with the specified pattern. FilterMethod.EQUALS indicates that the username must equal the specified pattern string. Supplying any other FilterMethod constant will result in a FilterMethod.EQUALS being applied.

### setMemberActive

    public void setMemberActive(boolean active)

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

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

### setMemberExternal

    public void setMemberExternal(boolean external)

  Specifies the member external status a membership must match to be included. If this method is not called, member external status is not used as a criteria for selection. Please note that once this method is called, member external status will be used as a criteria for selection-- there is no way to un-set this without creating a new MembershipCriteria object.

  Parameters
    `external` - the member external flag a membership must match to be included.

### copy

    public CommunityMembershipCriteria copy()

  Creates a copy of this CommunityMembershipCriteria object.

  Returns
    a copy of this CommunityMembershipCriteria object.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` 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 © 2008 BEA Systems, Inc. All Rights Reserved