com.kenshoo.pl.entity.EntityChange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.entity;
import java.util.stream.Stream;
public interface EntityChange> extends FieldsValueMap {
E getEntityType();
/**
* @return a stream of fields modified by this change, each field being included at most once
*/
Stream> getChangedFields();
/**
* @return a stream of the individual field changes modified by this change. The stream does not include
* suppliers, only fixed values
*/
Stream> getChanges();
/**
* @return true
if the field is affected by this change. A shorthand for getChangedFields().contains(field)
*/
boolean isFieldChanged(EntityField field);
/**
* @return the identifier of the entity being changed. Works only for update or delete changes, not for create
*/
Identifier getIdentifier();
/**
* @return of stream of sub changes of the entity
*/
Stream extends EntityChange extends EntityType>> getChildren();
/**
* @return of stream of sub changes of the entity by child type
*/
> Stream extends EntityChange> getChildren(CHILD type);
/**
* @return the parent identifier of the entity
*/
Identifier getKeysToParent();
/**
* @return return change operation
*/
ChangeOperation getChangeOperation();
/**
* @return return if entity must be found for entity change
*/
default boolean allowMissingEntity() {
return false;
}
}