public class EntityBase extends Object implements IEntity
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_NAME_EXPIRE |
static String |
ATTRIBUTE_NAME_ID |
static String |
ATTRIBUTE_NAME_MODIFY_STAMP |
static String |
ATTRIBUTE_NAME_REMOVED |
static String |
COLUMN_NAME_EXPIRE |
static String |
COLUMN_NAME_ID |
static String |
COLUMN_NAME_MODIFY_STAMP |
static String |
COLUMN_NAME_REMOVED |
Long |
Expire
Special feature to let entities expire after the specified amount of time.
|
String |
ExternalId
Sometimes the outside code wish to use it's own ID instead of generating
a new one all the time.
|
String |
Id |
Date |
ModifyStamp
Special feature to know when a DB entry was modified last time.
|
String |
PreId
help the DB back end to track the process of generating IDs within
error prone transactions.
|
boolean |
Removed
Interims feature to know 'removed' items in DB ...
|
| Constructor and Description |
|---|
EntityBase()
create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
TODO implement me
|
String |
getIDForStore() |
Date |
getModifyStamp() |
boolean |
isExpired() |
boolean |
isPersistent() |
boolean |
isRemoved() |
void |
setExpireInMinutes(long nExpire)
enable the expire feature for this entity and set the expire time in minutes from now.
|
void |
setExpireInSeconds(long nExpire)
enable the expire feature for this entity and set the expire time in seconds from now.
|
void |
setModifyStamp()
has to be called by the DB layer in case this entity is created new or updated
within the DB back end.
|
void |
setPersistent(boolean bPersistent)
mark the entity as persistent (or not persistent any longer) within the DB back end.
|
void |
setRemoved(boolean bState) |
String |
toString() |
public static final String ATTRIBUTE_NAME_ID
public static final String ATTRIBUTE_NAME_EXPIRE
public static final String ATTRIBUTE_NAME_MODIFY_STAMP
public static final String ATTRIBUTE_NAME_REMOVED
public static final String COLUMN_NAME_ID
public static final String COLUMN_NAME_EXPIRE
public static final String COLUMN_NAME_MODIFY_STAMP
public static final String COLUMN_NAME_REMOVED
public transient String PreId
public transient String ExternalId
public String Id
public Long Expire
public Date ModifyStamp
public boolean Removed
public boolean isPersistent()
throws Exception
Exceptionpublic void setPersistent(boolean bPersistent)
throws Exception
bPersistent - [IN]
the new persistent state.Exceptionpublic String getIDForStore() throws Exception
Exceptionpublic void setExpireInSeconds(long nExpire)
throws Exception
setExpireInSeconds in interface IEntitynExpire - [IN]
the time for expire in seconds.Exceptionpublic void setExpireInMinutes(long nExpire)
throws Exception
setExpireInMinutes in interface IEntitynExpire - [IN]
the time for expire in minutes.Exceptionpublic boolean isExpired()
throws Exception
Exceptionpublic void setModifyStamp()
throws Exception
Exceptionpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2016 as-development.net. All rights reserved.