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 Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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_DEFAULT
public static final int DELETED_CODE_DEFAULTThis is used to mark a deletion that must be shown in the trash bin- See Also:
-
DELETED_CODE_STRONG
public static final int DELETED_CODE_STRONGThis is used to mark a deletion that must be physically removed- See Also:
-
id
public long id
-
-
Constructor Details
-
PersistentObject
public PersistentObject()
-
-
Method Details
-
getId
public long getId()Unique identifier in the data store- Returns:
- the unique identifier of this record
-
setId
public void setId(long id) -
getLastModified
The last time this instance was modified- Returns:
- the last modified date
-
setLastModified
-
getDeleted
public int getDeleted()This flag is used to mark an object as deleted- Returns:
- 1 if the record is deleted, 0 otherwise
-
setDeleted
public void setDeleted(int deleted) -
toString
-
getTenantId
public long getTenantId() -
setTenantId
public void setTenantId(long tenantId) -
getRecordVersion
public long getRecordVersion() -
setRecordVersion
public void setRecordVersion(long recordVersion) -
getCreation
The object's creation date- Returns:
- the creation date
-
setCreation
-
hashCode
public int hashCode() -
equals
-