public interface Model<ID_TYPE,MODEL_TYPE extends Model> extends SimpleBean
SimpleBean.ByteCodeEnhancer, SimpleBean.ByteCodeScanner, SimpleBean.MetaInfo, SimpleBean.MetaInfoManager
Modifier and Type | Method and Description |
---|---|
ID_TYPE |
_id()
Returns the ID (key) of this entity
|
MODEL_TYPE |
_id(ID_TYPE id)
Set the ID(key) to this entity.
|
boolean |
_isNew()
Returns
true if the entity is just created in memory or been loaded from data storage |
ID_TYPE _id()
Returns the ID (key) of this entity
MODEL_TYPE _id(ID_TYPE id)
Set the ID(key) to this entity. This method assume the entity is at empty state, i.e. there is no ID already assigned to this entity before calling this method. Otherwise the IllegalStateException
will be thrown out
id
- the ID to be set to this entityIllegalStateException
- if ID has already set on this entityboolean _isNew()
Returns true
if the entity is just created in memory or been loaded from data storage
Copyright © 2014-2017 ActFramework. All Rights Reserved.