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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrebind(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration) 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) same asEntityBeanRebinder.rebindAndCollect(EntityRebindingData, RebindMode, RebindLimitConfiguration)but using an existing collectorvoidsetEntityHandlingStrategies(List<EntityHandlingStrategy> entityHandlingStrategies) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.rest.entity.spi.rebind.EntityBeanRebinder
rebind
-
Constructor Details
-
EntityBeanRebinderImpl
-
-
Method Details
-
setEntityHandlingStrategies
@Autowired public void setEntityHandlingStrategies(List<EntityHandlingStrategy> entityHandlingStrategies) -
rebind
public Entity rebind(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration) Description copied from interface:EntityBeanRebinderCreate or update an entity. The givenRebindModecontrols the rebinding. The givenRebindLimitConfigurationcontrols which entities are created or adjusted- Specified by:
rebindin interfaceEntityBeanRebinder- Parameters:
entityData- The entity data to rebind.rebindMode- The mode of the rebinding.limitConfiguration- Caller defined limits on what is allowed to get rebound- Returns:
- the rebound entity
-
rebindAndCollect
public Tuple2<Entity,EntityBeanRebinder.RebindCollector> rebindAndCollect(EntityRebindingData entityData, RebindMode rebindMode, RebindLimitConfiguration limitConfiguration) Description copied from interface:EntityBeanRebindersame asEntityBeanRebinder.rebind(EntityRebindingData, RebindMode, RebindLimitConfiguration), but collect all entities that are created or updated- Specified by:
rebindAndCollectin 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) Description copied from interface:EntityBeanRebindersame asEntityBeanRebinder.rebindAndCollect(EntityRebindingData, RebindMode, RebindLimitConfiguration)but using an existing collector- Specified by:
rebindAndCollectin interfaceEntityBeanRebinder- Parameters:
rebindCollector- the collector to use- Returns:
- a tuple containing the main entity that was rebound and all entities that were created or updated
-