org.itracker.model
Interface Entity

All Superinterfaces:
Cloneable, Comparable<Entity>, Serializable
All Known Implementing Classes:
AbstractEntity, Component, Configuration, CustomField, CustomFieldValue, ImportDataModel, Issue, IssueActivity, IssueAttachment, IssueField, IssueHistory, IssueRelation, Language, NameValuePair, Notification, Permission, Project, ProjectScript, Report, SystemConfiguration, User, UserPreferences, Version, WorkflowScript

public interface Entity
extends Serializable, Cloneable, Comparable<Entity>

All database entities must implement this interface, which represents the minimum requirements to meet.

A database entity always has an Integer surrogate key (system ID). It must also be Serializable and Cloneable.

A database entity class must also fulfill the following requirements, that cannot be expressed by a Java interface :

Author:
johnny
See Also:
AbstractEntity

Method Summary
 Date getCreateDate()
           
 Integer getId()
          Returns the system ID.
 Date getLastModifiedDate()
           
 boolean isNew()
           
 void setCreateDate(Date date)
           
 void setId(Integer id)
          Sets this entity's system ID.
 void setLastModifiedDate(Date date)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getId

Integer getId()
Returns the system ID.

Returns:
ID > 0 for persistent entities, null for transient ones

setId

void setId(Integer id)
Sets this entity's system ID.

Parameters:
id - ID > 0 for persistent entities, null for transient ones

setLastModifiedDate

void setLastModifiedDate(Date date)

getLastModifiedDate

Date getLastModifiedDate()

setCreateDate

void setCreateDate(Date date)

getCreateDate

Date getCreateDate()

isNew

boolean isNew()


Copyright © 2002-2012 itracker. All Rights Reserved.