Class DateDelimitedEntityServiceImpl
java.lang.Object
ch.tocco.nice2.entityoperation.impl.datedelimited.DateDelimitedEntityServiceImpl
- All Implemented Interfaces:
DateDelimitedEntityService
@Component
public class DateDelimitedEntityServiceImpl
extends Object
implements DateDelimitedEntityService
-
Constructor Summary
ConstructorDescriptionDateDelimitedEntityServiceImpl
(QueryBuilderFactory queryBuilderFactory, Context context) -
Method Summary
Modifier and TypeMethodDescriptionlooks for a entity of a given type, that is delimited by two date fields, that is active at the moment active means, that its start date is before or equal to now and its end date is after or equal to now additionally, conditions can be set that need to be true on the active entity found
-
Constructor Details
-
DateDelimitedEntityServiceImpl
-
-
Method Details
-
getActiveEntity
public Optional<Entity> getActiveEntity(DateDelimitationConfigBuilder.DateDelimitationConfig config) throws PersistException Description copied from interface:DateDelimitedEntityService
looks for a entity of a given type, that is delimited by two date fields, that is active at the moment active means, that its start date is before or equal to now and its end date is after or equal to now additionally, conditions can be set that need to be true on the active entity found- Specified by:
getActiveEntity
in interfaceDateDelimitedEntityService
- Parameters:
config
- theDateDelimitationConfigBuilder.DateDelimitationConfig
that will be used- Returns:
- optional of the first found entity, can be absent
- Throws:
PersistException
-
getNextActiveEntity
public Optional<Entity> getNextActiveEntity(DateDelimitationConfigBuilder.DateDelimitationConfig config) throws PersistException - Specified by:
getNextActiveEntity
in interfaceDateDelimitedEntityService
- Throws:
PersistException
-