org.kuali.rice.kns.document.authorization
Class PessimisticLock
java.lang.Object
org.kuali.rice.kns.bo.BusinessObjectBase
org.kuali.rice.kns.bo.PersistableBusinessObjectBase
org.kuali.rice.kns.document.authorization.PessimisticLock
- All Implemented Interfaces:
- Serializable, org.apache.ojb.broker.PersistenceBrokerAware, BusinessObject, PersistableBusinessObject
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.kns.bo.PersistableBusinessObjectBase |
addNote, afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeInsert, beforeUpdate, beforeUpdate, buildListOfDeletionAwareLists, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
DEFAULT_LOCK_DESCRIPTOR
public static final String DEFAULT_LOCK_DESCRIPTOR
id
private Long id
ownedByPrincipalIdentifier
private String ownedByPrincipalIdentifier
lockDescriptor
private String lockDescriptor
generatedTimestamp
private Timestamp generatedTimestamp
documentNumber
private String documentNumber
ownedByUser
private Person ownedByUser
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
toStringMapper
protected LinkedHashMap toStringMapper()
- This helper method used to define fields and field values to use
in toString() method
- Specified by:
toStringMapper
in class BusinessObjectBase
- Returns:
- Map containing the fieldValues of the key fields for this class, indexed by fieldName
- See Also:
BusinessObjectBase.toStringMapper()
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.