Modifier and Type | Method and Description |
---|---|
FluentLoader.ById<E,K> |
dynamicAttributes(boolean dynamicAttributes)
Sets loading of dynamic attributes.
|
E |
one()
Loads a single instance.
|
java.util.Optional<E> |
optional()
Loads a single instance and wraps it in Optional.
|
FluentLoader.ById<E,K> |
softDeletion(boolean softDeletion)
Sets soft deletion.
|
FluentLoader.ById<E,K> |
view(java.util.function.Consumer<ViewBuilder> viewBuilderConfigurer)
Sets a view configured by the
ViewBuilder . |
FluentLoader.ById<E,K> |
view(java.lang.String viewName)
Sets a view by name.
|
FluentLoader.ById<E,K> |
view(View view)
Sets a view.
|
FluentLoader.ById<E,K> |
viewProperties(java.lang.String... properties)
Sets a view containing the given properties.
|
public java.util.Optional<E> optional()
public E one()
java.lang.IllegalStateException
- if nothing was loadedpublic FluentLoader.ById<E,K> view(View view)
public FluentLoader.ById<E,K> view(java.lang.String viewName)
public FluentLoader.ById<E,K> view(java.util.function.Consumer<ViewBuilder> viewBuilderConfigurer)
ViewBuilder
. For example:
dataManager.load(Pet.class) .id(petId) .view(viewBuilder -> viewBuilder.addAll( "name", "owner.name")) .one();
public FluentLoader.ById<E,K> viewProperties(java.lang.String... properties)
dataManager.load(Pet.class) .id(petId) .viewProperties( "name", "owner.name", "owner.address.city") .one();
public FluentLoader.ById<E,K> softDeletion(boolean softDeletion)
public FluentLoader.ById<E,K> dynamicAttributes(boolean dynamicAttributes)