Interface CommissionLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Commission
relationships.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated foundry view: All commission methods in this session
operate, retrieve and pertain to commissions defined explicitly in the
current foundry. Using an isolated view is useful for managing
Commissionswith theCommissionAdminSession. - federated foundry view: All commission methods in this session operate, retrieve and pertain to all commissions defined in this foundry and any other commissions implicitly available in this foundry through foundry inheritence.
- effective commission view: All commission lookup methods return commissions where the current date falls in between the effective dates inclusive.
- any effective commission view: Commissions of any effective date are returned from methods.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedFoundryView() and
useIsolatedFoundryView() behave as a radio group and one should be
selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performCommissionlookups.getCommission(Id commissionId) Gets theCommissionspecified by itsId.Gets allCommissions.getCommissionsByGenusType(Type commissionGenusType) Gets aCommissionListcorresponding to the given commission genusTypewhich does not include commissions of genus types derived from the specifiedType.getCommissionsByIds(IdList commissionIds) Gets aCommissionListcorresponding to the givenIdList.getCommissionsByParentGenusType(Type commissionGenusType) Gets aCommissionListcorresponding to the given commission genusTypeand include any additional commissions with genus types derived from the specifiedType.getCommissionsByRecordType(Type commissionRecordType) Gets aCommissionListcontaining the given commission recordType.getCommissionsForResource(Id resourceId) Gets a list of commissions for a resource.getCommissionsForResourceAndWork(Id resourceId, Id workId) Gets a list of commissions for a resource and work.getCommissionsForResourceAndWorkOnDate(Id resourceId, Id workId, DateTime from, DateTime to) Gets a list of commissions for a resource and work and effective during the entire given date range inclusive but not confined to the date range.getCommissionsForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets a list of commissions for a resource and effective during the entire given date range inclusive but not confined to the date range.getCommissionsForWork(Id workId) Gets a list of commissions for a work.getCommissionsForWorkOnDate(Id workId, DateTime from, DateTime to) Gets a list of commissions for a work and effective during the entire given date range inclusive but not confined to the date range.getCommissionsOnDate(DateTime from, DateTime to) Gets a list of commissions effective during the entire given date range inclusive but not confined to the date range.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.voidAll commissions of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly commissions whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theCommissionreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getFoundryId
Id getFoundryId()Gets theFoundryIdassociated with this session.- Returns:
- the
Foundry Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFoundry
Gets theFoundryassociated with this session.- Returns:
- the foundry
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupCommissions
boolean canLookupCommissions()Tests if this user can performCommissionlookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeCommissionView
void useComparativeCommissionView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryCommissionView
void usePlenaryCommissionView()A complete view of theCommissionreturns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedFoundryView
void useFederatedFoundryView()Federates the view for methods in this session. A federated view will include commissions in foundries which are children of this foundry in the foundry hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedFoundryView
void useIsolatedFoundryView()Isolates the view for methods in this session. An isolated view restricts lookups to this foundry only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveCommissionView
void useEffectiveCommissionView()Only commissions whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveCommissionView
void useAnyEffectiveCommissionView()All commissions of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getCommission
Commission getCommission(Id commissionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theCommissionspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedCommissionmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aCommissionand retained for compatibility. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
commissionId-Idof theCommission- Returns:
- the commission
- Throws:
NotFoundException-commissionIdnot foundNullArgumentException-commissionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommissionsByIds
CommissionList getCommissionsByIds(IdList commissionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCommissionListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the commissions specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleCommissionsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
commissionIds- the list ofIdsto retrieve- Returns:
- the returned
Commissionlist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-commissionIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsByGenusType
CommissionList getCommissionsByGenusType(Type commissionGenusType) throws OperationFailedException, PermissionDeniedException Gets aCommissionListcorresponding to the given commission genusTypewhich does not include commissions of genus types derived from the specifiedType. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
commissionGenusType- a commission genus type- Returns:
- the returned
Commissionlist - Throws:
NullArgumentException-commissionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsByParentGenusType
CommissionList getCommissionsByParentGenusType(Type commissionGenusType) throws OperationFailedException, PermissionDeniedException Gets aCommissionListcorresponding to the given commission genusTypeand include any additional commissions with genus types derived from the specifiedType. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In both cases, the order of the set is by the start effective date. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
commissionGenusType- a commission genus type- Returns:
- the returned
Commissionlist - Throws:
NullArgumentException-commissionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsByRecordType
CommissionList getCommissionsByRecordType(Type commissionRecordType) throws OperationFailedException, PermissionDeniedException Gets aCommissionListcontaining the given commission recordType. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
commissionRecordType- a commission record type- Returns:
- the returned
Commissionlist - Throws:
NullArgumentException-commissionRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsOnDate
CommissionList getCommissionsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of commissions effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Commissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsForResource
CommissionList getCommissionsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of commissions for a resource. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Commissionlist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsForResourceOnDate
CommissionList getCommissionsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of commissions for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Commissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsForWork
CommissionList getCommissionsForWork(Id workId) throws OperationFailedException, PermissionDeniedException Gets a list of commissions for a work. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
workId- a workId- Returns:
- the returned C
ommissionlist - Throws:
NullArgumentException-workIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsForWorkOnDate
CommissionList getCommissionsForWorkOnDate(Id workId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of commissions for a work and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
workId- a workIdfrom- start of date rangeto- end of date range- Returns:
- the returned C
ommissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-workId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsForResourceAndWork
CommissionList getCommissionsForResourceAndWork(Id resourceId, Id workId) throws OperationFailedException, PermissionDeniedException Gets a list of commissions for a resource and work. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
resourceId- a resourceIdworkId- a workId- Returns:
- the returned C
ommissionlist - Throws:
NullArgumentException-resourceIdorworkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissionsForResourceAndWorkOnDate
CommissionList getCommissionsForResourceAndWorkOnDate(Id resourceId, Id workId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of commissions for a resource and work and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Parameters:
resourceId- a resourceIdworkId- a workIdfrom- start of date rangeto- end of date range- Returns:
- the returned C
ommissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, workId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommissions
Gets allCommissions. In plenary mode, the returned list contains all known commissions or an error results. Otherwise, the returned list may contain only those commissions that are accessible through this session. In effective mode, commissions are returned that are currently effective. In any effective mode, effective commissions and those currently expired are returned.- Returns:
- a list of
Commissions - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-