Class FieldFunction
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.fields.functions.FieldFunction
- All Implemented Interfaces:
Serializable,Cloneable
Application of a Function to a field - e.g., to take its raw or pure value
as stored in the backend, and apply a function to it (as in the math sense),
to get out a different value.
Used in virtual fields and query criteria to transform or extract a derived value from a raw field.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep clone of this FieldFunction, including a shallow copy of the arguments map.Getter for arguments<C extends Serializable>
CgetArgumentValueOrDefault(Class<C> type, String name) Returns the argument value for the given parameter name, or the parameter's declared default value if no argument was supplied.Getter for fieldNameGetter for functionTypeIdentifierjust serialize the identifier name - not an object.voidsetArguments(Map<String, Serializable> arguments) Setter for argumentsvoidsetFieldName(String fieldName) Setter for fieldNamevoidsetFunctionTypeIdentifier(FieldFunctionTypeIdentifier functionTypeIdentifier) Setter for functionTypeIdentifierwithArguments(Map<String, Serializable> arguments) Fluent setter for argumentswithFieldName(String fieldName) Fluent setter for fieldNamewithFunctionTypeIdentifier(FieldFunctionTypeIdentifier functionTypeIdentifier) Fluent setter for functionTypeIdentifier
-
Constructor Details
-
FieldFunction
public FieldFunction()
-
-
Method Details
-
getArgumentValueOrDefault
Returns the argument value for the given parameter name, or the parameter's declared default value if no argument was supplied. -
getFieldName
-
setFieldName
-
withFieldName
Fluent setter for fieldName- Parameters:
fieldName- The name of the field (on the record) to which this function should be applied.- Returns:
- this
-
clone
Returns a deep clone of this FieldFunction, including a shallow copy of the arguments map. -
getFunctionTypeIdentifier
Getter for functionTypeIdentifier- See Also:
-
getFunctionTypeIdentifierName
just serialize the identifier name - not an object. SeegetFunctionTypeIdentifier() -
setFunctionTypeIdentifier
Setter for functionTypeIdentifier- See Also:
-
withFunctionTypeIdentifier
Fluent setter for functionTypeIdentifier- Parameters:
functionTypeIdentifier- The identifier that specifies which function type should be applied to the field.- Returns:
- this
-
getArguments
-
setArguments
-
withArguments
Fluent setter for arguments- Parameters:
arguments- Map of argument names to their values (e.g., fromIndex=1, length=5), interpreted by the function type.- Returns:
- this
-