org.kuali.rice.krad.document.authorization
Class PessimisticLock
java.lang.Object
org.kuali.rice.krad.bo.BusinessObjectBase
org.kuali.rice.krad.bo.PersistableBusinessObjectBase
org.kuali.rice.krad.document.authorization.PessimisticLock
- All Implemented Interfaces:
- Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject
@Entity
public class PessimisticLock
- extends PersistableBusinessObjectBase
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:
- Serialized Form
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber |
DEFAULT_LOCK_DESCRIPTOR
public static final String DEFAULT_LOCK_DESCRIPTOR
PessimisticLock
@Deprecated
public PessimisticLock()
- Deprecated.
- This constructs an empty lock using the logged in user and default lock descriptor type
but will NOT assign a document number. Use another constructor.
PessimisticLock
public PessimisticLock(String documentNumber,
String lockDescriptor,
Person user)
- This constructs a lock object using the logged in user and given lock type
isOwnedByUser
public boolean isOwnedByUser(Person user)
getId
public Long getId()
- Returns:
- the id
setId
public void setId(Long id)
- Parameters:
id
- the id to set
getOwnedByPrincipalIdentifier
public String getOwnedByPrincipalIdentifier()
- Returns:
- the ownedByPrincipalIdentifier
setOwnedByPrincipalIdentifier
public void setOwnedByPrincipalIdentifier(String ownedByPrincipalIdentifier)
- Parameters:
ownedByPrincipalIdentifier
- the ownedByPrincipalIdentifier to set
getLockDescriptor
public String getLockDescriptor()
- Returns:
- the lockDescriptor
setLockDescriptor
public void setLockDescriptor(String lockDescriptor)
- Parameters:
lockDescriptor
- the lockDescriptor to set
getGeneratedTimestamp
public Timestamp getGeneratedTimestamp()
- Returns:
- the generatedTimestamp
setGeneratedTimestamp
public void setGeneratedTimestamp(Timestamp generatedTimestamp)
- Parameters:
generatedTimestamp
- the generatedTimestamp to set
getDocumentNumber
public String getDocumentNumber()
- Returns:
- the documentNumber
setDocumentNumber
public void setDocumentNumber(String documentNumber)
- Parameters:
documentNumber
- the documentNumber to set
getOwnedByUser
public Person getOwnedByUser()
- Returns:
- the ownedByUser
setOwnedByUser
public void setOwnedByUser(Person ownedByUser)
- Parameters:
ownedByUser
- the ownedByUser to set
Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.