public class HibSignatureDaoImpl extends com.jamasoftware.contour.data.util.hibernate4.HibernateDaoSupport implements SignatureDao
Constructor and Description |
---|
HibSignatureDaoImpl() |
Modifier and Type | Method and Description |
---|---|
void |
deleteSignature(Signature signature)
Deletes a
Signature permanently |
Signature |
getLatestSignatureForUserAndScopeRef(Integer userId,
Integer scopeId,
Integer refId,
boolean includeRevoked)
Gets the latest
Signature (by DomainObject.getCreatedDate() ) for a given scope/ref and user. |
Collection<Signature> |
getLatestSignaturesForUsersAndScopeRef(List<Integer> allUserIds,
Integer scopeId,
Integer refId,
boolean includeRevoked)
Obtains the latest
Signature (by DomainObject.getCreatedDate() ) for each user for the given scope
and ref. |
List<Signature> |
getSignaturesForScopeRef(Integer scopeId,
Integer refId,
boolean includeRevoked)
Gets
Signature s for a given scope/ref |
Signature |
saveSignature(Signature signature)
Persists a
Signature . |
public List<Signature> getSignaturesForScopeRef(Integer scopeId, Integer refId, boolean includeRevoked)
SignatureDao
Signature
s for a given scope/refgetSignaturesForScopeRef
in interface SignatureDao
scopeId
- scope of the objectrefId
- refId of the objectincludeRevoked
- Whether or not to include revoked signatures (see Signature.getIsRevoked()
)Signature
s for the given objectpublic Signature getLatestSignatureForUserAndScopeRef(Integer userId, Integer scopeId, Integer refId, boolean includeRevoked)
SignatureDao
Signature
(by DomainObject.getCreatedDate()
) for a given scope/ref and user. Returns
null if not foundgetLatestSignatureForUserAndScopeRef
in interface SignatureDao
scopeId
- scope of the objectrefId
- refId of the objectincludeRevoked
- Whether or not to include revoked signatures (see Signature.getIsRevoked()
)Signature
s for the given objectpublic Collection<Signature> getLatestSignaturesForUsersAndScopeRef(List<Integer> allUserIds, Integer scopeId, Integer refId, boolean includeRevoked)
SignatureDao
Signature
(by DomainObject.getCreatedDate()
) for each user for the given scope
and ref. Users that have no matching Signature
will not be associated with any returned Signature
s.getLatestSignaturesForUsersAndScopeRef
in interface SignatureDao
allUserIds
- A List
of User
idsscopeId
- A Scope
idrefId
- The id of the referenced object determined by the scopeincludeRevoked
- Whether revoked Signature
s should be returnedSignature
s for the given scope signed by a User
with one of the given idspublic Signature saveSignature(Signature signature)
SignatureDao
Signature
.saveSignature
in interface SignatureDao
signature
- The Signature
to savepublic void deleteSignature(Signature signature)
SignatureDao
Signature
permanentlydeleteSignature
in interface SignatureDao
signature
- The Signature
to deleteCopyright (c) 2013-2014 Jama Software, Inc. All Rights Reserved.