T
- 实体类的类型public abstract class IdNameEntityService<T> extends IdEntityService<T>
构造器和说明 |
---|
IdNameEntityService() |
IdNameEntityService(Dao dao) |
IdNameEntityService(Dao dao,
Class<T> entityType) |
限定符和类型 | 方法和说明 |
---|---|
int |
delete(String name)
根据@Name所标注的属性的值进行删除
|
boolean |
exists(String name)
是否存在符合条件的记录,需要实体有@Name标注
|
T |
fetch(String name)
根据@Name所标注的属性的值,获取一个实体
|
T |
smartFetch(String str)
智能获取一个实体,如str能转为Long类型,则调用fetch(long id),否则调用fetch(String name)
|
delete, exists, fetch, getMaxId
_clearLinks, _delete, _deleteLinks, _deleteWith, _fastInsert, _fetch, _fetchLinks, _fetchLinks, _insert, _insert, _insert, _insertLinks, _insertRelation, _insertWith, _query, _query, _update, _update, _updateIgnoreNull, _updateLinks, _updateWith, clear, clear, count, count, create, deletex, each, each, exists, fetch, fetchx, func, func, getEntity, getEntityClass, getObject, getObject, insert, mirror, query, query, query, setEntityType, setExpert, update, updateRelation
public IdNameEntityService()
IdEntityService
,
NameEntityService
public IdNameEntityService(Dao dao)
IdEntityService
,
NameEntityService
public IdNameEntityService(Dao dao, Class<T> entityType)
IdEntityService
,
NameEntityService
public int delete(String name)
name
- 属性的值public T smartFetch(String str)
str
- 非空的字符串,可以是整数或普通字符串public boolean exists(String name)
name
- 属性的值Copyright © 2017. All rights reserved.