Package com.kenshoo.pl.entity
Interface EntityChange<E extends EntityType<E>>
-
- All Superinterfaces:
FieldsValueMap<E>
- All Known Subinterfaces:
MutableCommand<E>
- All Known Implementing Classes:
ChangeEntityCommand,CreateEntityCommand,DeleteEntityCommand,InsertOnDuplicateUpdateCommand,UpdateEntityCommand
public interface EntityChange<E extends EntityType<E>> extends FieldsValueMap<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanallowMissingEntity()java.util.stream.Stream<EntityField<E,?>>getChangedFields()ChangeOperationgetChangeOperation()java.util.stream.Stream<FieldChange<E,?>>getChanges()java.util.stream.Stream<? extends EntityChange<? extends EntityType>>getChildren()<CHILD extends EntityType<CHILD>>
java.util.stream.Stream<? extends EntityChange<CHILD>>getChildren(CHILD type)EgetEntityType()Identifier<E>getIdentifier()Identifier<E>getKeysToParent()booleanisFieldChanged(EntityField<E,?> field)-
Methods inherited from interface com.kenshoo.pl.entity.FieldsValueMap
containsField, get, safeGet
-
-
-
-
Method Detail
-
getEntityType
E getEntityType()
-
getChangedFields
java.util.stream.Stream<EntityField<E,?>> getChangedFields()
- Returns:
- a stream of fields modified by this change, each field being included at most once
-
getChanges
java.util.stream.Stream<FieldChange<E,?>> getChanges()
- Returns:
- a stream of the individual field changes modified by this change. The stream does not include suppliers, only fixed values
-
isFieldChanged
boolean isFieldChanged(EntityField<E,?> field)
- Returns:
trueif the field is affected by this change. A shorthand forgetChangedFields().contains(field)
-
getIdentifier
Identifier<E> getIdentifier()
- Returns:
- the identifier of the entity being changed. Works only for update or delete changes, not for create
-
getChildren
java.util.stream.Stream<? extends EntityChange<? extends EntityType>> getChildren()
- Returns:
- of stream of sub changes of the entity
-
getChildren
<CHILD extends EntityType<CHILD>> java.util.stream.Stream<? extends EntityChange<CHILD>> getChildren(CHILD type)
- Returns:
- of stream of sub changes of the entity by child type
-
getKeysToParent
Identifier<E> getKeysToParent()
- Returns:
- the parent identifier of the entity
-
getChangeOperation
ChangeOperation getChangeOperation()
- Returns:
- return change operation
-
allowMissingEntity
default boolean allowMissingEntity()
- Returns:
- return if entity must be found for entity change
-
-