Package com.kenshoo.pl.entity
Interface FieldsValueMap<E extends EntityType<E>>
-
- All Known Subinterfaces:
EntityChange<E>,Identifier<E>,MutableCommand<E>
- All Known Implementing Classes:
ChangeEntityCommand,CreateEntityCommand,DeleteEntityCommand,FieldsValueMapImpl,InsertOnDuplicateUpdateCommand,ObservedResult,OverrideFieldsCombination,PairUniqueKeyValue,QuadrupleUniqueKeyValue,QuintupleUniqueKeyValue,ResultingFieldsCombination,SingleUniqueKeyValue,TripleUniqueKeyValue,UniqueKeyValue,UpdateEntityCommand
public interface FieldsValueMap<E extends EntityType<E>>The interface of any field -> value collection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> booleancontainsField(EntityField<E,T> field)Returnstrueis the map has a value for the given field<T> Tget(EntityField<E,T> field)Returns the value of the specified field.default <T> Triptional<T>safeGet(EntityField<E,T> field)
-
-
-
Method Detail
-
containsField
<T> boolean containsField(EntityField<E,T> field)
Returnstrueis the map has a value for the given field
-
get
<T> T get(EntityField<E,T> field)
Returns the value of the specified field.- Type Parameters:
T- type of the field- Parameters:
field- field to query- Returns:
- the value of the field. Can be
null. - Throws:
java.lang.RuntimeException- if the field is not present in the map
-
safeGet
default <T> Triptional<T> safeGet(EntityField<E,T> field)
- Type Parameters:
T- the type of the value in the field- Parameters:
field- field whose value should be fetched- Returns:
- the field value if not-
null; orTriptional.nullInstance()ifnull; orTriptional.absent()if the field doesn't exist
-
-