Package com.jalios.jcms.dbmember
Class DBMemberQueryUtil
java.lang.Object
com.jalios.jcms.dbmember.DBMemberQueryUtil
Provides utility methods to retrieve Hibernate Criterion suitable for DBMember query.
- Since:
- jcms-10.0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hibernate.criterion.CriteriongetClearanceLevelCriterion(Set<Integer> levelSet) Retrieve an Hibernate Criterion to retrieve DBMember who have the specified clearance level.static org.hibernate.criterion.CriterionRetrieve an Hibernate Criterion to retrieve DBMember who have the specified Member as its explicit declared manager or not.static org.hibernate.criterion.CriteriongetEnabledCriterion(Boolean enabled) Retrieve an Hibernate Criterion to retrieve DBMember enabled or disabled.static org.hibernate.criterion.CriteriongetExternalAuthCriterion(Boolean externalAuth) Retrieve an Hibernate Criterion to search for enabled account suppoting either all authentication or external authentication only.static org.hibernate.criterion.CriteriongetGroupCriterion(Collection<Group> groups) Retrieve an Hibernate Criterion to retrieve DBMember in at least one of the specified groups and any of its descendant.static org.hibernate.criterion.CriteriongetGroupCriterion(Collection<Group> groups, boolean includeGrpDescendant) Retrieve an Hibernate Criterion to retrieve DBMember in at least one of the specified groups.static org.hibernate.criterion.CriteriongetGroupOffCriterion(Collection<Group> groups) Retrieve an Hibernate Criterion to retrieve DBMember which are not in any of the specified groups and any of its descendant.static org.hibernate.criterion.CriteriongetGroupOffCriterion(Collection<Group> groups, boolean includeGrpDescendant) Retrieve an Hibernate Criterion to retrieve DBMember which are not in any of the specified groups (and any of its descendant if specified).static org.hibernate.criterion.CriteriongetGuestCriterion(Boolean isGuest) Retrieve an Hibernate Criterion to retrieve DBMember guest or not guest.static org.hibernate.criterion.CriteriongetHasDeclaredManagerCriterion(Boolean hasDeclaredManager) Retrieve an Hibernate Criterion to retrieve DBMember who have an explicit declared manager or not.static org.hibernate.criterion.CriteriongetLdapAccountCriterion(Boolean ldapAccount) Retrieve an Hibernate Criterion to retrieve DBMember who are ldapAccount or not.static org.hibernate.criterion.CriteriongetLdapSyncCriterion(Boolean ldapSyncEnabled) Retrieve an Hibernate Criterion to retrieve DBMember who should be synchronized with LDAP.static org.hibernate.criterion.CriterionReturn an Hibernate criterion suitable to find DBMember to synchronized with LDAP.static org.hibernate.criterion.CriteriongetTextCriterion(String text) Retrieve an Hibernate Criterion to retrieve DBMember matching specified text.static org.hibernate.criterion.CriteriongetUsageCriterion(int usage) Retrieve an Hibernate Criterion to retrieve DBMember of the specified usage.static org.hibernate.criterion.CriterionRetrieve an Hibernate Criterion to retrieve DBMember in at least one of the specified groups.
-
Constructor Details
-
DBMemberQueryUtil
public DBMemberQueryUtil()
-
-
Method Details
-
getTextCriterion
Retrieve an Hibernate Criterion to retrieve DBMember matching specified text.- Parameters:
text- text to search- Returns:
- a Criterion or null if no text were requested
-
getGroupCriterion
Retrieve an Hibernate Criterion to retrieve DBMember in at least one of the specified groups and any of its descendant.- Parameters:
groups- a Collection of Group- Returns:
- a Criterion or null if no groups were requested
-
getGroupCriterion
public static org.hibernate.criterion.Criterion getGroupCriterion(Collection<Group> groups, boolean includeGrpDescendant) Retrieve an Hibernate Criterion to retrieve DBMember in at least one of the specified groups.- Parameters:
groups- a Collection of GroupincludeGrpDescendant- true to search for member in all descendant of the specified groups, false to search for member explicitely declared in one of the specified group- Returns:
- a Criterion or null if no groups were requested
-
getGroupOffCriterion
Retrieve an Hibernate Criterion to retrieve DBMember which are not in any of the specified groups and any of its descendant.- Parameters:
groups- a Collection of Group to exclude- Returns:
- a Criterion or null if no groups were requested
- Since:
- jcms-10.0.2 - JCMS-6619
-
getGroupOffCriterion
public static org.hibernate.criterion.Criterion getGroupOffCriterion(Collection<Group> groups, boolean includeGrpDescendant) Retrieve an Hibernate Criterion to retrieve DBMember which are not in any of the specified groups (and any of its descendant if specified).- Parameters:
groups- a Collection of Group to excludeincludeGrpDescendant- true to search for member in all descendant of the specified groups, false to search for member explicitely declared in one of the specified group- Returns:
- a Criterion or null if no groups were requested
- Since:
- jcms-10.0.7 - JCMS-9425
-
getWorkspaceCriterion
Retrieve an Hibernate Criterion to retrieve DBMember in at least one of the specified groups.- Parameters:
ws- a Workspace to match- Returns:
- a Criterion or null if no Workspace was specified
-
getUsageCriterion
public static org.hibernate.criterion.Criterion getUsageCriterion(int usage) Retrieve an Hibernate Criterion to retrieve DBMember of the specified usage.- Parameters:
usage- a usage to match- Returns:
- a Criterion or null if negative usage
-
getEnabledCriterion
Retrieve an Hibernate Criterion to retrieve DBMember enabled or disabled.- Parameters:
enabled- TRUE to search for enabled DBMember, FALSE to search for disabled Member, null to return null criterion- Returns:
- a Criterion or null if null value specified
- Since:
- jcms-10.0.2 - JCMS-6619
-
getExternalAuthCriterion
Retrieve an Hibernate Criterion to search for enabled account suppoting either all authentication or external authentication only.- Parameters:
externalAuth- TRUE to search for enabled DBMember account supporting only external authentication, FALSE to search for enabled DBMember account supporting all authentication (local password and external), null to return null criterion.- Returns:
- a Criterion or null if null value specified
- Since:
- jcms-10.0.6 / JCMS-9072
-
getGuestCriterion
Retrieve an Hibernate Criterion to retrieve DBMember guest or not guest.- Parameters:
isGuest- TRUE to search for guests DBMember, FALSE to search for non guests Member, null to return null criterion- Returns:
- a Criterion or null if null value specified
- Since:
- jcms-10.0.6 - JCMS-9060
-
getLdapAccountCriterion
Retrieve an Hibernate Criterion to retrieve DBMember who are ldapAccount or not.- Parameters:
ldapAccount- null to return a null Criterion, TRUE to retrieve a criterion for LDAP account only, FALSE to retrieve non LDAP account only.- Returns:
- a Criertion or null if null was specified as ldapAccoutn argument
- Since:
- jcms-10.0.1 / JCMS-6340
-
getLdapSyncCriterion
Retrieve an Hibernate Criterion to retrieve DBMember who should be synchronized with LDAP.- Parameters:
ldapSyncEnabled- null to return a null Criterion, TRUE to retrieve a criterion for DBMember to synchronized with LDAP, FALSE to retrieve DBMember for which LDAP synchronized is disabled.- Returns:
- a Criertion or null if null was specified as ldapAccoutn argument
- Since:
- jcms-10.0.1 / JCMS-6340
-
getLdapSynchronizedCriterion
Return an Hibernate criterion suitable to find DBMember to synchronized with LDAP.That is, DBMember mathing ALL the following criterion :
- LDAP (i.e. with a valid last sync date),
- account (i.e. with account usage)
- with LDAP synchronisation enabled,
- optionally belonging to the specified group or any of its subgroup
- Parameters:
group- an optional group (may be null)- Returns:
- an hibernate critertion, never return null.
-
getHasDeclaredManagerCriterion
public static org.hibernate.criterion.Criterion getHasDeclaredManagerCriterion(Boolean hasDeclaredManager) Retrieve an Hibernate Criterion to retrieve DBMember who have an explicit declared manager or not.- Parameters:
hasDeclaredManager- null to return a null Criterion, TRUE to retrieve a criterion for Member an explicit declared manager, FALSE to retrieve Member without any explicit declared manager.- Returns:
- a Criterion or null if null was specified as hasDeclaredManager argument
- Since:
- jcms-10.0.7 / JCMS-9477
-
getDeclaredManagerCriterion
Retrieve an Hibernate Criterion to retrieve DBMember who have the specified Member as its explicit declared manager or not.- Parameters:
mbr- the required Member manager to search (if null, null is returned)- Returns:
- a Criterion or null if null was specified as mbr argument
- Since:
- jcms-10.0.7 / JCMS-9477
-
getClearanceLevelCriterion
Retrieve an Hibernate Criterion to retrieve DBMember who have the specified clearance level.- Parameters:
levelSet- a set member clearance level or null if there is no filter on Member's clearance level- Returns:
- a Criterion or null if null was specified as mbr argument
- Since:
- 10.0.8 / JCMS-10746
-