public enum FormulaEvaluatorUtil extends Enum<FormulaEvaluatorUtil>
Some code in formulas does not need to be generated again and again but is implemented in static methods in this class that are used by the formulas.
IFormulaEvaluator| Modifier and Type | Class and Description |
|---|---|
static class |
FormulaEvaluatorUtil.AssociationTo1Helper<S extends IModelObject,T extends IModelObject>
Helper class for navigating 1-to-1 associations from a list of source objects of type
<S> to target objects of type <T>. |
static class |
FormulaEvaluatorUtil.AssociationToManyHelper<S extends IModelObject,T extends IModelObject>
Helper class for navigating 1-to-many associations from a list of source objects of type
<S> to target objects of type <T>. |
static class |
FormulaEvaluatorUtil.AttributeAccessorHelper<S extends IModelObject,E>
Helper class to get the values from a list of source objects of type
<S> to target
type <E>. |
static class |
FormulaEvaluatorUtil.ExistsHelper
Helper class to encapsulate a function call to verify the existence of an object that could
result in an
Exception (for example a NullPointerException or
IndexOutOfBoundsException when navigating over associations in model objects) which should just be treated as a false result. |
static class |
FormulaEvaluatorUtil.FunctionWithListAsArgumentHelper<E>
Base class for functions working on list arguments.
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends IModelObject,R extends T> |
getListModelObjectById(List<? extends T> modelObjects,
String id)
Returns all
IConfigurableModelObject in the list that is configured by a
IProductComponent with the given ID, the list is empty if no such object is found in
the list. |
static <T extends IModelObject,R extends T> |
getModelObjectById(List<? extends T> modelObjects,
String id)
Returns the (first)
IConfigurableModelObject in the list that is configured by a
IProductComponent with the given ID, null if no such object is found in the
list. |
static <T extends IModelObject,R extends T> |
getModelObjectById(T modelObject,
String id)
Returns the
IModelObject if it is a IConfigurableModelObject configured by a
IProductComponent with the given ID, null otherwise. |
static FormulaEvaluatorUtil |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FormulaEvaluatorUtil[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static FormulaEvaluatorUtil[] values()
for (FormulaEvaluatorUtil c : FormulaEvaluatorUtil.values()) System.out.println(c);
public static FormulaEvaluatorUtil valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static <T extends IModelObject,R extends T> R getModelObjectById(List<? extends T> modelObjects, String id)
IConfigurableModelObject in the list that is configured by a
IProductComponent with the given ID, null if no such object is found in the
list.T - the type of IModelObject returned by this method and expected in the listmodelObjects - a list of model objects of type Tid - the runtime ID this method searchesIConfigurableModelObject in the list that is configured by a
IProductComponent with the given ID, null if no such object is found
in the listgetModelObjectById(IModelObject, String)public static <T extends IModelObject,R extends T> List<? extends R> getListModelObjectById(List<? extends T> modelObjects, String id)
IConfigurableModelObject in the list that is configured by a
IProductComponent with the given ID, the list is empty if no such object is found in
the list.T - the type of IModelObject returned by this method and expected in the listmodelObjects - a list of model objects of type Tid - the runtime ID this method searchesIConfigurableModelObject in the list that is configured by a
IProductComponent with the given ID, the list is empty if no such object is
found in the listgetModelObjectById(IModelObject, String)public static <T extends IModelObject,R extends T> R getModelObjectById(T modelObject, String id)
IModelObject if it is a IConfigurableModelObject configured by a
IProductComponent with the given ID, null otherwise.T - the type of IModelObject returned and expected by this methodmodelObject - a model object of type Tid - the runtime ID this method searchesIModelObject if it is a IConfigurableModelObject configured by a
IProductComponent with the given ID, null otherwisegetModelObjectById(List, String)Copyright © 2021. All rights reserved.