Class EntityBeanRebinderImpl
java.lang.Object
ch.tocco.nice2.rest.entity.impl.rebind.EntityBeanRebinderImpl
- All Implemented Interfaces:
EntityBeanRebinder
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.rest.entity.spi.rebind.EntityBeanRebinder
EntityBeanRebinder.RebindCollector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionrebind
(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration, boolean setDefaultValues) Create or update an entity.rebindAndCollect
(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration) same asEntityBeanRebinder.rebind(EntityRebindingData, RebindMode, RebindLimitConfiguration)
, but collect all entities that are created or updatedrebindAndCollect
(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration, EntityBeanRebinder.RebindCollector rebindCollector, boolean setDefaultValues) same asEntityBeanRebinder.rebindAndCollect(EntityRebindingData, RebindMode, RebindLimitConfiguration)
but using an existing collectorvoid
setEntityHandlingStrategies
(List<EntityHandlingStrategy> entityHandlingStrategies) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.rest.entity.spi.rebind.EntityBeanRebinder
rebind, rebind, rebindAndCollect
-
Constructor Details
-
EntityBeanRebinderImpl
-
-
Method Details
-
setEntityHandlingStrategies
@Autowired public void setEntityHandlingStrategies(List<EntityHandlingStrategy> entityHandlingStrategies) -
rebind
public Entity rebind(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration, boolean setDefaultValues) Description copied from interface:EntityBeanRebinder
Create or update an entity. The givenRebindMode
controls the rebinding. The givenRebindLimitConfiguration
controls which entities are created or adjusted- Specified by:
rebind
in interfaceEntityBeanRebinder
- Parameters:
entityData
- The entity data to rebind.rebindMode
- The mode of the rebinding.limitConfiguration
- Caller defined limits on what is allowed to get reboundsetDefaultValues
- define if default values should be set for new entities (default true)- Returns:
- the rebound entity
-
rebindAndCollect
public Tuple2<Entity,EntityBeanRebinder.RebindCollector> rebindAndCollect(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration) Description copied from interface:EntityBeanRebinder
same asEntityBeanRebinder.rebind(EntityRebindingData, RebindMode, RebindLimitConfiguration)
, but collect all entities that are created or updated- Specified by:
rebindAndCollect
in interfaceEntityBeanRebinder
- Returns:
- a tuple containing the main entity that was rebound and all entities that were created or updated
-
rebindAndCollect
public Tuple2<Entity,EntityBeanRebinder.RebindCollector> rebindAndCollect(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration, EntityBeanRebinder.RebindCollector rebindCollector, boolean setDefaultValues) Description copied from interface:EntityBeanRebinder
same asEntityBeanRebinder.rebindAndCollect(EntityRebindingData, RebindMode, RebindLimitConfiguration)
but using an existing collector- Specified by:
rebindAndCollect
in interfaceEntityBeanRebinder
- Parameters:
rebindCollector
- the collector to usesetDefaultValues
- define if default values should be set for new entities (default true)- Returns:
- a tuple containing the main entity that was rebound and all entities that were created or updated
-