Interface EntityChange<E extends EntityType<E>>

    • 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:
        true if the field is affected by this change. A shorthand for getChangedFields().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