Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright 2014 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* @author mchyzer
* $Id: AttributeAssignDAO.java,v 1.10 2009-10-02 05:57:58 mchyzer Exp $
*/
package edu.internet2.middleware.grouper.internal.dao;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import edu.internet2.middleware.grouper.attr.AttributeDef;
import edu.internet2.middleware.grouper.attr.AttributeDefName;
import edu.internet2.middleware.grouper.attr.AttributeDefType;
import edu.internet2.middleware.grouper.attr.AttributeDefValueType;
import edu.internet2.middleware.grouper.attr.assign.AttributeAssign;
import edu.internet2.middleware.grouper.attr.assign.AttributeAssignType;
import edu.internet2.middleware.grouper.attr.value.AttributeAssignValueContainer;
import edu.internet2.middleware.grouperClient.collections.MultiKey;
/**
* attribute assign data access methods
*/
public interface AttributeAssignDAO extends GrouperDAO {
/**
* find records which are disabled which shouldnt be, and enabled which shouldnt be
* @param queryTime
* @return the attribute assignments
*/
public Set findAllEnabledDisabledMismatch(long queryTime);
/**
* insert or update an attribute assign object
* @param attributeAssign
*/
public void saveOrUpdate(AttributeAssign attributeAssign);
/**
* delete an attribute assign object
* @param attributeAssign
*/
public void delete(AttributeAssign attributeAssign);
/**
* find by id, use cache
* @param id
* @param exceptionIfNotFound
* @return the attribute assign or null if not there
*/
public AttributeAssign findById(String id, boolean exceptionIfNotFound);
/**
* @param id
* @param exceptionIfNotFound
* @param useCache true to use cache, false for not
* @return the attribute assign or null if not there
*/
public AttributeAssign findById(String id, boolean exceptionIfNotFound, boolean useCache);
/**
* @param groupId
* @param attributeDefNameId
* @return the attribute assigns or null if not there
*/
public Set findByGroupIdAndAttributeDefNameId(String groupId, String attributeDefNameId);
/**
* @param groupId
* @param attributeDefId
* @return the attribute assigns or null if not there
*/
public Set findByGroupIdAndAttributeDefId(String groupId, String attributeDefId);
/**
* find attribute def names (distinct) by attribute def id
* @param groupId
* @param attributeDefId
* @return the attribute defs
*/
public Set findAttributeDefNamesByGroupIdAndAttributeDefId(String groupId, String attributeDefId);
/**
* @param memberId
* @param attributeDefNameId
* @return the attribute assigns or null if not there
*/
public Set findByMemberIdAndAttributeDefNameId(String memberId, String attributeDefNameId);
/**
* @param memberId
* @param attributeDefId
* @return the attribute assigns or null if not there
*/
public Set findByMemberIdAndAttributeDefId(String memberId, String attributeDefId);
/**
* find attribute def names (distinct) by attribute def id
* @param memberId
* @param attributeDefId
* @return the attribute defs
*/
public Set findAttributeDefNamesByMemberIdAndAttributeDefId(String memberId, String attributeDefId);
/**
* find attribute assigns by ids, as root (no security). this is for one type assignment.
* @param attributeTypeAssignId type assign id
* @return attributes
*/
public Set findByAssignTypeId(
String attributeTypeAssignId);
/**
* find attribute assigns by ids, as root (no security). order by attribute type def name, so they are in order
* @param attributeTypeDefNameId attribute def name of the type on the owner
* @param queryOptions
* @return attributes grouped by the type assignment
*/
public Map> findByAttributeTypeDefNameId(
String attributeTypeDefNameId, QueryOptions queryOptions);
/**
* @param stemId
* @param attributeDefNameId
* @return the attribute assigns or null if not there
*/
public Set findByStemIdAndAttributeDefNameId(String stemId, String attributeDefNameId);
/**
* @param stemId
* @param attributeDefId
* @return the attribute assigns or null if not there
*/
public Set findByStemIdAndAttributeDefId(String stemId, String attributeDefId);
/**
* find attribute def names (distinct) by attribute def id
* @param stemId
* @param attributeDefId
* @return the attribute defs
*/
public Set findAttributeDefNamesByStemIdAndAttributeDefId(String stemId, String attributeDefId);
/**
* find attribute def names (distinct) by attribute def id
* @param attributeDefIdToAssignTo
* @param attributeDefIdToAssign
* @return the attribute defs
*/
public Set findAttributeDefNamesByAttributeDefIdAndAttributeDefId(String attributeDefIdToAssignTo,
String attributeDefIdToAssign);
/**
* @param attributeDefIdToAssignTo
* @param attributeDefIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByAttributeDefIdAndAttributeDefId(String attributeDefIdToAssignTo, String attributeDefIdToAssign);
/**
* @param attributeDefIdToAssignTo
* @param attributeDefNameIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByAttributeDefIdAndAttributeDefNameId(String attributeDefIdToAssignTo, String attributeDefNameIdToAssign);
/**
* @param ownerAttributeAssignId
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerAttributeAssignId(String ownerAttributeAssignId);
/**
* @param ownerAttributeAssignId
* @param queryOptions
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerAttributeAssignId(String ownerAttributeAssignId, QueryOptions queryOptions);
/**
* @param ownerAttributeDefId
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerAttributeDefId(String ownerAttributeDefId);
/**
* @param attributeDefNameId
* @return the attribute defs or empty if not there
*/
public Set findAttributeDefsByAttributeDefNameId(String attributeDefNameId);
/**
* @param ownerGroupId
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerGroupId(String ownerGroupId);
/**
* retrieve by owner immediate membership ids. note, this is not a secure method, will return any results queried
* @param ownerMembershipIds
* @return the attribute assigns, will not return null
*/
public Set findByOwnerMembershipIds(Collection ownerMembershipIds);
/**
* retrieve by owner attribute assign ids. note, this is not a secure method, will return any results queried
* @param ownerAttributeAssignIds
* @return the attribute assigns, will not return null
*/
public Set findByOwnerAttributeAssignIds(Collection ownerAttributeAssignIds);
/**
* @param ownerStemId
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerStemId(String ownerStemId);
/**
* @param ownerMemberId
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerMemberId(String ownerMemberId);
/**
* @param ownerMembershipId
* @return the attribute assigns or empty if not there
*/
public Set findByOwnerMembershipId(String ownerMembershipId);
/**
* find attribute def names (distinct) by attribute def id
* @param membershipIdToAssignTo
* @param attributeDefIdToAssign
* @return the attribute defs
*/
public Set findAttributeDefNamesByMembershipIdAndAttributeDefId(
String membershipIdToAssignTo,
String attributeDefIdToAssign);
/**
* @param membershipIdToAssignTo
* @param attributeDefIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByMembershipIdAndAttributeDefId(
String membershipIdToAssignTo, String attributeDefIdToAssign);
/**
* @param membershipIdToAssignTo
* @param attributeDefNameIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByMembershipIdAndAttributeDefNameId(
String membershipIdToAssignTo, String attributeDefNameIdToAssign);
/**
* find attribute def names (distinct) by attribute def id
* @param attrAssignIdToAssignTo
* @param attributeDefIdToAssign
* @return the attribute defs
*/
public Set findAttributeDefNamesByAttrAssignIdAndAttributeDefId(
String attrAssignIdToAssignTo,
String attributeDefIdToAssign);
/**
* @param attrAssignIdToAssignTo
* @param attributeDefIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByAttrAssignIdAndAttributeDefId(
String attrAssignIdToAssignTo, String attributeDefIdToAssign);
/**
* @param attributeDefNameId
* @return the attribute assigns or empty if not there
*/
public Set findByAttributeDefNameId(
String attributeDefNameId);
/**
* @param attrAssignIdToAssignTo
* @param attributeDefNameIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByAttrAssignIdAndAttributeDefNameId(
String attrAssignIdToAssignTo, String attributeDefNameIdToAssign);
/**
* find attribute def names (distinct) by attribute def id
* @param groupId
* @param memberId
* @param attributeDefIdToAssign
* @return the attribute defs
*/
public Set findAttributeDefNamesByGroupIdMemberIdAndAttributeDefId(
String groupId, String memberId,
String attributeDefIdToAssign);
/**
* @param groupId
* @param memberId
* @param attributeDefIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByGroupIdMemberIdAndAttributeDefId(
String groupId, String memberId, String attributeDefIdToAssign);
/**
* @param groupId
* @param memberId
* @param attributeDefNameIdToAssign
* @return the attribute assigns or null if not there
*/
public Set findByGroupIdMemberIdAndAttributeDefNameId(
String groupId, String memberId, String attributeDefNameIdToAssign);
/**
* save the update properties which are auto saved when business method is called
* @param attributeAssign
*/
public void saveUpdateProperties(AttributeAssign attributeAssign);
/**
* @param id if find by id, that is it
* @param idsToIgnore dont return anything in this list, already used or will be used
* @param attributeDefNameId which attribute is assigned
* @param attributeAssignActionId is the action for this assignment
* @param ownerAttributeAssignId owner must match
* @param ownerAttributeDefId owner must match
* @param ownerGroupId owner must match
* @param ownerMemberId owner must match
* @param ownerMembershipId owner must match
* @param ownerStemId owner must match
* @param exceptionIfNull
* @param disabledTimeDb if there are multiple without id match, and this matches, that is good
* @param enabledTimeDb if there are multiple without id match, this is good
* @param notes if there are multiple without id match, this is good
* @param disallowed if there are multiple without id match, this is good
* @return the attribute assign or null
* @throws GrouperDAOException
* @since 1.6.0
*/
AttributeAssign findByUuidOrKey(Collection idsToIgnore,
String id, String attributeDefNameId, String attributeAssignActionId, String ownerAttributeAssignId, String ownerAttributeDefId, String ownerGroupId,
String ownerMemberId, String ownerMembershipId, String ownerStemId, boolean exceptionIfNull,
Long disabledTimeDb, Long enabledTimeDb, String notes, boolean disallowed) throws GrouperDAOException;
/**
* @param actionId
* @return the assignments
*/
Set findByActionId(String actionId);
/**
* securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or group ids
* cannot have more than 100 bind variables
* @param attributeAssignIds
* @param attributeDefIds optional
* @param attributeDefNameIds mutually exclusive with attributeDefIds
* @param groupIds optional
* @param actions (null means all actions)
* @param enabled (null means all, true means enabled, false means disabled)
* @param includeAssignmentsOnAssignments if assignments on assignments should also be included
* @param attributeDefType null for all, or specify a type e.g. AttributeDefType.limit
* @return the assignments
*/
public Set findGroupAttributeAssignments(
Collection attributeAssignIds,
Collection attributeDefIds,
Collection attributeDefNameIds,
Collection groupIds,
Collection actions,
Boolean enabled,
boolean includeAssignmentsOnAssignments,
AttributeDefType attributeDefType);
/**
* securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or group ids
* cannot have more than 100 bind variables
* @param attributeAssignIds
* @param attributeDefIds optional
* @param attributeDefNameIds mutually exclusive with attributeDefIds
* @param groupIds optional
* @param actions (null means all actions)
* @param enabled (null means all, true means enabled, false means disabled)
* @param includeAssignmentsOnAssignments if assignments on assignments should also be included
* @return the assignments
*/
public Set findGroupAttributeAssignments(
Collection attributeAssignIds,
Collection attributeDefIds,
Collection attributeDefNameIds,
Collection groupIds,
Collection actions,
Boolean enabled,
boolean includeAssignmentsOnAssignments);
/**
* securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or stem ids
* cannot have more than 100 bind variables
* @param attributeAssignIds
* @param attributeDefIds optional
* @param attributeDefNameIds mutually exclusive with attributeDefIds
* @param stemIds optional
* @param actions (null means all actions)
* @param enabled (null means all, true means enabled, false means disabled)
* @param includeAssignmentsOnAssignments if assignments on assignments should also be included
* @return the assignments
*/
public Set findStemAttributeAssignments(
Collection attributeAssignIds,
Collection attributeDefIds,
Collection attributeDefNameIds,
Collection stemIds, Collection actions,
Boolean enabled, boolean includeAssignmentsOnAssignments);
/**
* securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or stem ids
* cannot have more than 100 bind variables
* @param attributeAssignIds
* @param attributeDefIds optional
* @param attributeDefNameIds mutually exclusive with attributeDefIds
* @param stemIds optional
* @param actions (null means all actions)
* @param enabled (null means all, true means enabled, false means disabled)
* @param includeAssignmentsOnAssignments if assignments on assignments should also be included
* @param attributeDefType null for all, or specify a type e.g. AttributeDefType.limit
* @param attributeDefValueType required if sending theValue, can be:
* floating, integer, memberId, string, timestamp
* @param theValue value if you are passing in one attributeDefNameLookup
* @return the assignments
*/
public Set findStemAttributeAssignments(
Collection attributeAssignIds,
Collection attributeDefIds,
Collection attributeDefNameIds,
Collection stemIds, Collection actions,
Boolean enabled, boolean includeAssignmentsOnAssignments,
AttributeDefType attributeDefType,
AttributeDefValueType attributeDefValueType,
Object theValue);
/**
* securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or stem ids
* cannot have more than 100 bind variables
* @param attributeAssignIds
* @param attributeDefIds optional
* @param attributeDefNameIds mutually exclusive with attributeDefIds
* @param stemIds optional
* @param actions (null means all actions)
* @param enabled (null means all, true means enabled, false means disabled)
* @param includeAssignmentsOnAssignments if assignments on assignments should also be included
* @param attributeDefType null for all, or specify a type e.g. AttributeDefType.limit
* @param attributeDefValueType required if sending theValue, can be:
* floating, integer, memberId, string, timestamp
* @param theValue value if you are passing in one attributeDefNameLookup
* @param attributeCheckReadOnAttributeDef if check READ security on attribute def
* @return the assignments
*/
public Set findStemAttributeAssignments(
Collection attributeAssignIds,
Collection attributeDefIds,
Collection attributeDefNameIds,
Collection stemIds, Collection actions,
Boolean enabled, boolean includeAssignmentsOnAssignments,
AttributeDefType attributeDefType,
AttributeDefValueType attributeDefValueType,
Object theValue, boolean attributeCheckReadOnAttributeDef);
/**
* securely search for assignments. need to pass in either the assign ids, def ids, def name ids, or stem ids
* cannot have more than 100 bind variables
* @param attributeAssignIds
* @param attributeDefIds optional
* @param attributeDefNameIds mutually exclusive with attributeDefIds
* @param stemIds optional
* @param actions (null means all actions)
* @param enabled (null means all, true means enabled, false means disabled)
* @param includeAssignmentsOnAssignments if assignments on assignments should also be included
* @param attributeDefType null for all, or specify a type e.g. AttributeDefType.limit
* @param attributeDefValueType required if sending theValue, can be:
* floating, integer, memberId, string, timestamp
* @param theValue value if you are passing in one attributeDefNameLookup
* @param attributeCheckReadOnAttributeDef if check READ security on attribute def
* @param idOfAttributeDefNameOnAssignment id of attribute def name that there is an assignment on assignment of with a value
* @param attributeValuesOnAssignment values that the attribute def name on assignment of assignment has
* @param idOfAttributeDefNameOnAssignment2 second id of attribute def name that there is an assignment on assignment of with a value
* @param attributeValuesOnAssignment2 second values that the attribute def name on assignment of assignment has
* @return the assignments
*/
public Set findStemAttributeAssignments(
Collection attributeAssignIds,
Collection attributeDefIds,
Collection attributeDefNameIds,
Collection stemIds, Collection actions,
Boolean enabled, boolean includeAssignmentsOnAssignments,
AttributeDefType attributeDefType,
AttributeDefValueType attributeDefValueType,
Object theValue, boolean attributeCheckReadOnAttributeDef,
final String idOfAttributeDefNameOnAssignment, Set