Package com.logicaldoc.core
Class PersistentObject
java.lang.Object
com.logicaldoc.core.PersistentObject
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ApiKey,- AttributeOption,- Bookmark,- Contact,- Dashlet,- Device,- DocumentLink,- DocumentNote,- ExtensibleObject,- Group,- History,- Menu,- Message,- MessageTemplate,- PasswordHistory,- Rating,- SavedSearch,- Sequence,- Session,- Tenant,- Ticket,- User
This abstract class defines the minimum requirements of persistent objects.
- Since:
- 4.0
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThis is used to mark a deletion that must be shown in the trash binstatic final intThis is used to mark a deletion that must be physically removedlong
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanThe object's creation dateintThis flag is used to mark an object as deletedlonggetId()Unique identifier in the data storeThe last time this instance was modifiedlonglonginthashCode()voidsetCreation(Date creation) voidsetDeleted(int deleted) voidsetId(long id) voidsetLastModified(Date lastModified) voidsetRecordVersion(long recordVersion) voidsetTenantId(long tenantId) toString()
- 
Field Details- 
DELETED_CODE_DEFAULTpublic static final int DELETED_CODE_DEFAULTThis is used to mark a deletion that must be shown in the trash bin- See Also:
 
- 
DELETED_CODE_STRONGpublic static final int DELETED_CODE_STRONGThis is used to mark a deletion that must be physically removed- See Also:
 
- 
idpublic long id
 
- 
- 
Constructor Details- 
PersistentObjectpublic PersistentObject()
 
- 
- 
Method Details- 
getIdpublic long getId()Unique identifier in the data store- Returns:
- the unique identifier of this record
 
- 
setIdpublic void setId(long id) 
- 
getLastModifiedThe last time this instance was modified- Returns:
- the last modified date
 
- 
setLastModified
- 
getDeletedpublic int getDeleted()This flag is used to mark an object as deleted- Returns:
- 1 if the record is deleted, 0 otherwise
 
- 
setDeletedpublic void setDeleted(int deleted) 
- 
toString
- 
getTenantIdpublic long getTenantId()
- 
setTenantIdpublic void setTenantId(long tenantId) 
- 
getRecordVersionpublic long getRecordVersion()
- 
setRecordVersionpublic void setRecordVersion(long recordVersion) 
- 
getCreationThe object's creation date- Returns:
- the creation date
 
- 
setCreation
- 
hashCodepublic int hashCode()
- 
equals
 
-