T - public class CRUDSource<T> extends Object implements CRUDInterface<T>
| Constructor and Description |
|---|
CRUDSource()
Empty or no argument constructor.
|
CRUDSource(RepositoryInterface repositoryInterface)
Repository interface based CRUDSource constructor initializer.
|
| Modifier and Type | Method and Description |
|---|---|
T |
create(T object)
Content or data object saving interface function definition for new object.
|
void |
delete(T object)
Content or data object deletion interface function definition for exiting
object.
|
void |
deleteAll()
Content or data object deletion interface function definition for exiting
objects.
|
void |
deleteByKey(Object key)
Content or data object deletion interface function definition for exiting
object based on key value.
|
void |
deleteByKey(Object[] keys)
Content or data object deletion interface function definition for exiting
object based on composite key value.
|
RepositoryInterface |
getRepositoryInterface()
Gets repository interface reference.
|
protected Object |
getTypedKey(Object key)
When implemented (or overridden) in extended class provide casted key
object extraction means.
|
protected Object[] |
getTypedKeys(Object[] keys)
When implemented (or overridden) in extended class provide casted key
objects extraction means.
|
T |
read(Object key)
Content or data object reading interface function definition based on a
key value.
|
T |
read(Object[] keys)
Content or data object reading interface function definition based on a
composite key value.
|
List<T> |
readAll()
List of content or data objects reading interface function definition.
|
org.springframework.data.domain.Page<T> |
readAll(org.springframework.data.domain.Pageable pageable)
List wise (paged) content or data objects reading interface function
definition.
|
List<T> |
readByKeyword(String keyword)
List of content or data object reading interface function definition based
on a keyword value.
|
org.springframework.data.domain.Page<T> |
readByKeyword(String keyword,
org.springframework.data.domain.Pageable pageable)
List wise (or paged) content or data objects reading interface function
definition based on a keyword value.
|
List<T> |
select(Object refKey,
String keyword)
List of selected content or data objects reading interface function
definition based on reference key and keyword values.
|
org.springframework.data.domain.Page<T> |
select(Object refKey,
String keyword,
org.springframework.data.domain.Pageable pageable)
List wise (paged) selected content or data objects reading interface function
definition based on reference key and keyword values.
|
List<T> |
selectWithin(Object refKey,
String keyword)
List of selected content or data objects reading interface function
definition based on self-referenced key and keyword values.
|
org.springframework.data.domain.Page<T> |
selectWithin(Object refKey,
String keyword,
org.springframework.data.domain.Pageable pageable)
List wise (paged) selected content or data objects reading interface function
definition based on self-referenced key and keyword values.
|
void |
setRepositoryInterface(RepositoryInterface repositoryInterface)
Sets repository interface reference.
|
T |
update(T object)
Content or data object saving interface function definition for exiting
object.
|
public CRUDSource()
public CRUDSource(RepositoryInterface repositoryInterface)
repositoryInterface - public RepositoryInterface getRepositoryInterface()
public void setRepositoryInterface(RepositoryInterface repositoryInterface)
repositoryInterface - protected Object getTypedKey(Object key)
key - protected Object[] getTypedKeys(Object[] keys)
keys - public T create(T object)
CRUDInterfacecreate in interface CRUDInterface<T>public T read(Object key)
CRUDInterfaceread in interface CRUDInterface<T>public T read(Object[] keys)
CRUDInterfaceread in interface CRUDInterface<T>public List<T> readByKeyword(String keyword)
CRUDInterfacereadByKeyword in interface CRUDInterface<T>public org.springframework.data.domain.Page<T> readByKeyword(String keyword, org.springframework.data.domain.Pageable pageable)
CRUDInterfacereadByKeyword in interface CRUDInterface<T>public List<T> readAll()
CRUDInterfacereadAll in interface CRUDInterface<T>public org.springframework.data.domain.Page<T> readAll(org.springframework.data.domain.Pageable pageable)
CRUDInterfacereadAll in interface CRUDInterface<T>public T update(T object)
CRUDInterfaceupdate in interface CRUDInterface<T>public void delete(T object)
CRUDInterfacedelete in interface CRUDInterface<T>public void deleteByKey(Object key)
CRUDInterfacedeleteByKey in interface CRUDInterface<T>public void deleteByKey(Object[] keys)
CRUDInterfacedeleteByKey in interface CRUDInterface<T>public void deleteAll()
CRUDInterfacedeleteAll in interface CRUDInterface<T>public List<T> select(Object refKey, String keyword)
CRUDInterfaceselect in interface CRUDInterface<T>public org.springframework.data.domain.Page<T> select(Object refKey, String keyword, org.springframework.data.domain.Pageable pageable)
CRUDInterfaceselect in interface CRUDInterface<T>public List<T> selectWithin(Object refKey, String keyword)
CRUDInterfaceselectWithin in interface CRUDInterface<T>public org.springframework.data.domain.Page<T> selectWithin(Object refKey, String keyword, org.springframework.data.domain.Pageable pageable)
CRUDInterfaceselectWithin in interface CRUDInterface<T>Copyright © 2018. All rights reserved.