Class PessimisticLock
java.lang.Object
org.kuali.rice.krad.bo.DataObjectBase
org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter
org.kuali.rice.krad.document.authorization.PessimisticLock
- All Implemented Interfaces:
Serializable,org.kuali.rice.core.api.mo.common.GloballyUnique,org.kuali.rice.core.api.mo.common.Versioned,org.kuali.rice.core.api.mo.ModelObjectBasic,org.kuali.rice.krad.bo.BusinessObject
@Entity
public class PessimisticLock
extends PersistableBusinessObjectBaseAdapter
implements org.kuali.rice.krad.bo.BusinessObject
This is a business object used to lock a document pessimistically.
Pessimistic locking is more strick than optimistic locking and assumes if a
lock exists that a user should only have read-only access to a document. For
more information see documentation pages.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter
extension, newCollectionRecordFields inherited from class org.kuali.rice.krad.bo.DataObjectBase
objectId, versionNumber -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.PessimisticLock(String documentNumber, String lockDescriptor, org.kuali.rice.kim.api.identity.Person user, UserSession userSession) This constructs a lock object using the logged in user and given lock type -
Method Summary
Modifier and TypeMethodDescriptiongetId()org.kuali.rice.kim.api.identity.PersonbooleanisOwnedByUser(org.kuali.rice.kim.api.identity.Person user) voidsetDocumentNumber(String documentNumber) voidsetGeneratedTimestamp(Timestamp generatedTimestamp) voidvoidsetLockDescriptor(String lockDescriptor) voidsetOwnedByPrincipalIdentifier(String ownedByPrincipalIdentifier) voidsetOwnedByUser(org.kuali.rice.kim.api.identity.Person ownedByUser) voidsetSessionId(String sessionId) Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter
buildListOfDeletionAwareLists, getExtension, getLegacyDataAdapter, isNewCollectionRecord, linkEditableUserFields, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecordMethods inherited from class org.kuali.rice.krad.bo.DataObjectBase
generateAndSetObjectIdIfNeeded, getExtensionObject, getObjectId, getVersionNumber, prePersist, preUpdate, setExtensionObject, setObjectId, setVersionNumber, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.bo.BusinessObject
refreshMethods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
-
Field Details
-
DEFAULT_LOCK_DESCRIPTOR
-
-
Constructor Details
-
PessimisticLock
Deprecated.This constructs an empty lock using the logged in user and default lock descriptor type but will NOT assign a document number or session id. Use another constructor. -
PessimisticLock
public PessimisticLock(String documentNumber, String lockDescriptor, org.kuali.rice.kim.api.identity.Person user, UserSession userSession) This constructs a lock object using the logged in user and given lock type
-
-
Method Details
-
isOwnedByUser
public boolean isOwnedByUser(org.kuali.rice.kim.api.identity.Person user) -
getId
- Returns:
- the id
-
setId
- Parameters:
id- the id to set
-
getOwnedByPrincipalIdentifier
- Returns:
- the ownedByPrincipalIdentifier
-
setOwnedByPrincipalIdentifier
- Parameters:
ownedByPrincipalIdentifier- the ownedByPrincipalIdentifier to set
-
getLockDescriptor
- Returns:
- the lockDescriptor
-
setLockDescriptor
- Parameters:
lockDescriptor- the lockDescriptor to set
-
getGeneratedTimestamp
- Returns:
- the generatedTimestamp
-
setGeneratedTimestamp
- Parameters:
generatedTimestamp- the generatedTimestamp to set
-
getDocumentNumber
- Returns:
- the documentNumber
-
setDocumentNumber
- Parameters:
documentNumber- the documentNumber to set
-
getSessionId
- Returns:
- the sessionId
-
setSessionId
- Parameters:
sessionId- the sessionId to set
-
getOwnedByUser
public org.kuali.rice.kim.api.identity.Person getOwnedByUser()- Returns:
- the ownedByUser
-
setOwnedByUser
public void setOwnedByUser(org.kuali.rice.kim.api.identity.Person ownedByUser) - Parameters:
ownedByUser- the ownedByUser to set
-