public abstract class AbstractBaseDomainObjectService<T extends IDataImpl<E>,E extends IBaseEntity> extends BaseService implements IBaseDomainObjectService<T>
限定符和类型 | 字段和说明 |
---|---|
protected Class<T> |
domainObjectClass |
protected Class<E> |
entityClass |
构造器和说明 |
---|
AbstractBaseDomainObjectService() |
限定符和类型 | 方法和说明 |
---|---|
int |
countByFilter(EntityFilter entityFilter)
依据过滤器,获得该过滤器所包含的查询结果的数量信息
|
protected T |
createClientObject(E objectEntity) |
protected <U extends IBaseEntity,I extends IDataImpl<U>> |
createClientObject(U objectEntity,
Class<I> objectClass) |
protected List<T> |
createClientObjects(List<E> entities) |
protected <U extends IBaseEntity,I extends IDataImpl<U>> |
createClientObjects(List<U> objectEntitys,
Class<I> objectClass) |
EntityFilter |
createFilter()
创建过滤器
|
void |
delete(T obj)
直接删除对象,该删除为逻辑删除
|
void |
deleteById(long objId)
通过ID删除对象
|
void |
deleteByIds(List<Long> objIds)
直接删除所有ID的对象,该删除为逻辑删除
|
T |
getByFilter(EntityFilter entityFilter)
通过过滤器获得所需要的对象,并且从返回结果中取出第一个
|
T |
getById(long id)
通过ID获得对象
|
T |
getByIdAndEvict(long id)
获取最新的对象,并移出缓存,变为游离状态
|
protected abstract IBaseEntityHandler<E> |
getEntityHandler() |
protected List<E> |
getInternalEntities(List<T> entities) |
protected E |
getInternalEntity(T t) |
com.ags.lumosframework.common.IObjectType |
getObjectType() |
List<T> |
list(int startPosition,
int maxCount)
使用该方法有可能会导致性能问题,请大家使用的时候谨慎。
|
PageModel<T> |
list(PageInfo pageInfo)
分页查询
|
List<T> |
listByFilter(EntityFilter entityFilter)
通过过滤器获得所需要的对象。
|
Collection<? extends SimpleData> |
listSimpleData()
获得数据的简单版本,仅仅包含最基本的信息,不会交叉拿出该对象的详细信息,如果该接口不能满足你的要求,在需要更多数据的情况下,请使用getALL接口。
|
PageModel<T> |
pagingByFilter(EntityFilter entityFilter)
分页条件查询
|
T |
save(T obj)
保存对象,并返回更新的对象
|
void |
saveAll(List<T> objs)
保存所有对象,在分布式环境下,会将对象一次性全部发往服务端处理
|
protected Class<E extends IBaseEntity> entityClass
public T save(T obj)
IBaseDomainObjectService
save
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public void saveAll(List<T> objs)
IBaseDomainObjectService
saveAll
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public void deleteById(long objId)
IBaseDomainObjectService
deleteById
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public void delete(T obj)
IBaseDomainObjectService
delete
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public void deleteByIds(List<Long> objIds)
IBaseDomainObjectService
deleteByIds
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public T getById(long id)
IBaseDomainObjectService
getById
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public T getByIdAndEvict(long id)
IBaseDomainObjectService
getByIdAndEvict
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public List<T> list(int startPosition, int maxCount)
IBaseDomainObjectService
list
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public PageModel<T> list(PageInfo pageInfo)
list
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
pageInfo
- 分页对象public Collection<? extends SimpleData> listSimpleData()
IBaseDomainObjectService
listSimpleData
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public List<T> listByFilter(EntityFilter entityFilter)
IBaseDomainObjectService
listByFilter
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public T getByFilter(EntityFilter entityFilter)
IBaseDomainObjectService
getByFilter
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public int countByFilter(EntityFilter entityFilter)
IBaseDomainObjectService
countByFilter
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
public PageModel<T> pagingByFilter(EntityFilter entityFilter)
pagingByFilter
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
entityFilter
- public EntityFilter createFilter()
IBaseDomainObjectService
createFilter
在接口中 IBaseDomainObjectService<T extends IDataImpl<E>>
protected <U extends IBaseEntity,I extends IDataImpl<U>> I createClientObject(U objectEntity, Class<I> objectClass)
protected <U extends IBaseEntity,I extends IDataImpl<U>> List<I> createClientObjects(List<U> objectEntitys, Class<I> objectClass)
public com.ags.lumosframework.common.IObjectType getObjectType()
protected abstract IBaseEntityHandler<E> getEntityHandler()
Copyright © 2019. All rights reserved.