public class FluentLoader<E extends Entity<K>,K>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
FluentLoader.ById |
class |
FluentLoader.ByQuery |
Modifier and Type | Method and Description |
---|---|
FluentLoader.ById |
id(K id)
Sets the entity identifier.
|
java.util.List<E> |
list()
Loads a list of entities.
|
E |
one()
Loads a single instance.
|
java.util.Optional<E> |
optional()
Loads a single instance and wraps it in Optional.
|
FluentLoader.ByQuery |
query(java.lang.String queryString)
Sets the query text.
|
FluentLoader<E,K> |
softDeletion(boolean softDeletion)
Sets soft deletion.
|
FluentLoader<E,K> |
view(java.lang.String viewName)
Sets a view by name.
|
FluentLoader<E,K> |
view(View view)
Sets a view.
|
public java.util.List<E> list()
public java.util.Optional<E> optional()
public E one()
java.lang.IllegalStateException
- if nothing was loadedpublic FluentLoader<E,K> view(View view)
public FluentLoader<E,K> view(java.lang.String viewName)
public FluentLoader<E,K> softDeletion(boolean softDeletion)
public FluentLoader.ById id(K id)
public FluentLoader.ByQuery query(java.lang.String queryString)