Package com.tetsuwantech.atom.database
Class GenericServiceImpl<E extends GenericEntity,K>
- java.lang.Object
-
- com.tetsuwantech.atom.database.GenericServiceImpl<E,K>
-
- All Implemented Interfaces:
GenericService<E,K>
- Direct Known Subclasses:
AuditServiceImpl
,SecureServiceImpl
,SubjectServiceImpl
@Named("GenericService") public abstract class GenericServiceImpl<E extends GenericEntity,K> extends Object implements GenericService<E,K>
-
-
Constructor Summary
Constructors Constructor Description GenericServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
count(K where)
Long
count(K where, String column)
void
create(E object)
List<E>
findAll()
List<E>
findAll(K where)
List<E>
findAll(K where, String column)
List<E>
findAll(K where, String column, String orderBy)
E
findFirst(K where)
E
findFirst(K where, String column)
E
get(Long id)
void
remove(Long id)
E
save(E object)
List<E>
search(K where, String column, String text, String[] fields)
-
-
-
Method Detail
-
create
public void create(E object)
- Specified by:
create
in interfaceGenericService<E extends GenericEntity,K>
-
save
public E save(E object)
- Specified by:
save
in interfaceGenericService<E extends GenericEntity,K>
-
get
public E get(Long id)
- Specified by:
get
in interfaceGenericService<E extends GenericEntity,K>
-
remove
public void remove(Long id)
- Specified by:
remove
in interfaceGenericService<E extends GenericEntity,K>
-
findAll
public List<E> findAll()
- Specified by:
findAll
in interfaceGenericService<E extends GenericEntity,K>
-
findAll
public List<E> findAll(K where)
- Specified by:
findAll
in interfaceGenericService<E extends GenericEntity,K>
-
findAll
public List<E> findAll(K where, String column)
- Specified by:
findAll
in interfaceGenericService<E extends GenericEntity,K>
-
findAll
public List<E> findAll(K where, String column, String orderBy)
- Specified by:
findAll
in interfaceGenericService<E extends GenericEntity,K>
-
findFirst
public E findFirst(K where)
- Specified by:
findFirst
in interfaceGenericService<E extends GenericEntity,K>
-
findFirst
public E findFirst(K where, String column)
- Specified by:
findFirst
in interfaceGenericService<E extends GenericEntity,K>
-
count
public Long count(K where)
- Specified by:
count
in interfaceGenericService<E extends GenericEntity,K>
-
count
public Long count(K where, String column)
- Specified by:
count
in interfaceGenericService<E extends GenericEntity,K>
-
-