MODEL_TYPE
- the generic type of Model classID_TYPE
- the generic type of the ID (Key)@NoBind public abstract class ModelBase<ID_TYPE,MODEL_TYPE extends ModelBase> extends java.lang.Object implements Model<ID_TYPE,MODEL_TYPE>
The model base class
SimpleBean.ByteCodeEnhancer, SimpleBean.ByteCodeScanner, SimpleBean.MetaInfo, SimpleBean.MetaInfoManager
Modifier and Type | Field and Description |
---|---|
protected java.lang.reflect.Type |
idType |
protected java.lang.reflect.Type |
modelType |
Constructor and Description |
---|
ModelBase() |
Modifier and Type | Method and Description |
---|---|
protected MODEL_TYPE |
_me() |
static <T extends Dao> |
dao()
Returns a
Dao object that can operate on this entity of the entities with the same type. |
static <T extends Dao> |
dao(java.lang.Class<T> cls)
Returns a
Dao object that can operate on this entity of the entities with the same type. |
boolean |
equals(java.lang.Object obj) |
ID_TYPE |
getId() |
int |
hashCode() |
protected java.lang.Class<ID_TYPE> |
idType() |
protected java.lang.Class<MODEL_TYPE> |
modelType() |
void |
setId(ID_TYPE id) |
java.lang.String |
toString() |
protected transient java.lang.reflect.Type idType
protected transient java.lang.reflect.Type modelType
public ID_TYPE getId()
public void setId(ID_TYPE id)
protected java.lang.Class<ID_TYPE> idType()
protected java.lang.Class<MODEL_TYPE> modelType()
public static <T extends Dao> T dao()
Returns a Dao
object that can operate on this entity of the entities with the same type.
Note this method needs to be enhanced by framework to be called
Dao
objectpublic static <T extends Dao> T dao(java.lang.Class<T> cls)
Returns a Dao
object that can operate on this entity of the entities with the same type.
Note this method needs to be enhanced by framework to be called
Dao
objectpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected final MODEL_TYPE _me()
Copyright © 2014–2017 ActFramework. All rights reserved.