Class SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>>
- java.lang.Object
-
- ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier<T,R,M,P,THIS>
-
- ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier.GetObjectChainedStepSupplier<SpringDataContext,R,T,SelectOneStepSupplier<R,ID,T>>
-
- ru.tinkoff.qa.neptune.spring.data.select.SelectOneStepSupplier<R,ID,T>
-
- All Implemented Interfaces:
Cloneable
,Supplier<Function<SpringDataContext,R>>
,StepParameterPojo
,SelectQuery<R>
- Direct Known Subclasses:
SelectOneByExampleStepSupplier
public abstract class SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>> extends SequentialGetStepSupplier.GetObjectChainedStepSupplier<SpringDataContext,R,T,SelectOneStepSupplier<R,ID,T>> implements SelectQuery<R>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier
SequentialGetStepSupplier.DefaultGetParameterReader, SequentialGetStepSupplier.DefineCriteriaParameterName, SequentialGetStepSupplier.DefineFromParameterName, SequentialGetStepSupplier.DefineGetImperativeParameterName, SequentialGetStepSupplier.DefinePollingTimeParameterName, SequentialGetStepSupplier.DefineResultDescriptionParameterName, SequentialGetStepSupplier.DefineTimeOutParameterName, SequentialGetStepSupplier.GetArrayChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetArrayChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetArrayStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetArrayStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetListChainedStepSupplier<T,S extends Iterable<R>,M,R,THIS extends SequentialGetStepSupplier.GetListChainedStepSupplier<T,S,M,R,THIS>>, SequentialGetStepSupplier.GetListStepSupplier<T,S extends Iterable<R>,R,THIS extends SequentialGetStepSupplier.GetListStepSupplier<T,S,R,THIS>>, SequentialGetStepSupplier.GetObjectChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetObjectChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetObjectFromArrayChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetObjectFromArrayChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetObjectFromArrayStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetObjectFromArrayStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetObjectFromIterableChainedStepSupplier<T,R,M,THIS extends SequentialGetStepSupplier.GetObjectFromIterableChainedStepSupplier<T,R,M,THIS>>, SequentialGetStepSupplier.GetObjectFromIterableStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetObjectFromIterableStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetObjectStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetObjectStepSupplier<T,R,THIS>>, SequentialGetStepSupplier.GetSimpleStepSupplier<T,R,THIS extends SequentialGetStepSupplier.GetSimpleStepSupplier<T,R,THIS>>
-
-
Field Summary
-
Fields inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier
toReport
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SelectOneStepSupplier(T repository, Function<T,R> select)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>
additionalParameters()
Returns additional parameters calculated during step executionprotected SelectOneStepSupplier<R,ID,T>
from(T from)
SelectOneStepSupplier<R,ID,T>
pollingInterval(Duration pollingTime)
Sometimes it is necessary to wait until some result that may be considered valuable is returned.protected SelectOneStepSupplier<R,ID,T>
setDescription(String description)
<S> GetArrayFromEntity<S,R>
thenGetArray(Function<R,S[]> f)
Creates a step that returns an array calculated or taken from selected entity-object<S> GetItemOfArrayFromEntity<S,R>
thenGetArrayItem(Function<R,S[]> f)
Creates a step that returns an object taken from an array calculated or taken from selected entity-object<ITEM,S extends Iterable<ITEM>>
GetItemOfIterableFromEntity<ITEM,S,R>thenGetIterableItem(Function<R,S> f)
Creates a step that returns an object taken from an iterable calculated or taken from selected entity-object<ITEM,S extends Iterable<ITEM>>
GetListFromEntity<ITEM,S,R>thenGetList(Function<R,S> f)
Creates a step that returns a list calculated or taken from selected entity-object<S> GetObjectFromEntity<S,R>
thenGetObject(Function<R,S> f)
Creates a step that returns an object calculated or taken from selected entity-objectSelectOneStepSupplier<R,ID,T>
timeOut(Duration timeOut)
Sometimes it is necessary to wait until some result that may be considered valuable is returned.-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier.GetObjectChainedStepSupplier
from, from
-
Methods inherited from class ru.tinkoff.qa.neptune.core.api.steps.SequentialGetStepSupplier
addIgnored, addIgnored, eraseTimeOut, getCriteria, getDescription, getEndFunction, getFrom, getParameters, makeACopy, onFailure, onStart, onSuccess, preparePreFunction, throwOnNoResult, toString, turnReportingOff
-
-
-
-
Method Detail
-
from
protected SelectOneStepSupplier<R,ID,T> from(T from)
- Overrides:
from
in classSequentialGetStepSupplier.GetObjectChainedStepSupplier<SpringDataContext,R,T extends org.springframework.data.repository.Repository<R,ID>,SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>>>
-
setDescription
protected SelectOneStepSupplier<R,ID,T> setDescription(String description)
- Overrides:
setDescription
in classSequentialGetStepSupplier<SpringDataContext,R,T extends org.springframework.data.repository.Repository<R,ID>,R,SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>>>
-
timeOut
public SelectOneStepSupplier<R,ID,T> timeOut(Duration timeOut)
Description copied from class:SequentialGetStepSupplier
Sometimes it is necessary to wait until some result that may be considered valuable is returned. This method is for defining the waiting time.- Overrides:
timeOut
in classSequentialGetStepSupplier<SpringDataContext,R,T extends org.springframework.data.repository.Repository<R,ID>,R,SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>>>
- Parameters:
timeOut
- is a time duration to get desired value- Returns:
- self-reference
-
pollingInterval
public SelectOneStepSupplier<R,ID,T> pollingInterval(Duration pollingTime)
Description copied from class:SequentialGetStepSupplier
Sometimes it is necessary to wait until some result that may be considered valuable is returned. It sets how often the function should be evaluated.- Overrides:
pollingInterval
in classSequentialGetStepSupplier<SpringDataContext,R,T extends org.springframework.data.repository.Repository<R,ID>,R,SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>>>
- Parameters:
pollingTime
- The timeout duration.- Returns:
- A self reference.
-
additionalParameters
protected Map<String,String> additionalParameters()
Description copied from class:SequentialGetStepSupplier
Returns additional parameters calculated during step execution- Overrides:
additionalParameters
in classSequentialGetStepSupplier<SpringDataContext,R,T extends org.springframework.data.repository.Repository<R,ID>,R,SelectOneStepSupplier<R,ID,T extends org.springframework.data.repository.Repository<R,ID>>>
- Returns:
- additional parameters calculated during step execution
-
thenGetObject
public <S> GetObjectFromEntity<S,R> thenGetObject(Function<R,S> f)
Creates a step that returns an object calculated or taken from selected entity-object- Type Parameters:
S
- is a type of desired result- Parameters:
f
- describes how to get desired data from the entity-object- Returns:
- step that returns an object after execution.
-
thenGetList
public <ITEM,S extends Iterable<ITEM>> GetListFromEntity<ITEM,S,R> thenGetList(Function<R,S> f)
Creates a step that returns a list calculated or taken from selected entity-object- Type Parameters:
ITEM
- is a type of resulted list itemS
- is a type of iterable to get. This iterable is converted to list which consists of required objects- Parameters:
f
- describes how to get desired data from the entity-object- Returns:
- step that returns a list after execution.
-
thenGetArray
public <S> GetArrayFromEntity<S,R> thenGetArray(Function<R,S[]> f)
Creates a step that returns an array calculated or taken from selected entity-object- Type Parameters:
S
- is a type of array item- Parameters:
f
- describes how to get desired data from the entity-object- Returns:
- step that returns an array after execution.
-
thenGetIterableItem
public <ITEM,S extends Iterable<ITEM>> GetItemOfIterableFromEntity<ITEM,S,R> thenGetIterableItem(Function<R,S> f)
Creates a step that returns an object taken from an iterable calculated or taken from selected entity-object- Type Parameters:
ITEM
- is a type of iterable itemS
- is a type of iterable to take the resulted object from- Parameters:
f
- is how to get an iterable to take the resulted object from- Returns:
- step that returns an object after execution.
-
thenGetArrayItem
public <S> GetItemOfArrayFromEntity<S,R> thenGetArrayItem(Function<R,S[]> f)
Creates a step that returns an object taken from an array calculated or taken from selected entity-object- Type Parameters:
S
- is a type of array item- Parameters:
f
- is how to get an array to take the resulted object from- Returns:
- step that returns an object after execution.
-
-