@Experimental public class Apply extends Object implements PostProcessingOperation
APPLY can perform arithmetic operations on numeric properties or apply functions depending on property types.
{
@code
// Calculate total value from price and quantity
Apply totalValue = Apply.of("@price * @quantity", "total_value");
// Mathematical operations
Apply discount = Apply.of("@price * 0.9", "discounted_price");
}
PostProcessingOperation| Constructor and Description |
|---|
Apply(String expression,
String name)
Creates a new APPLY operation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
build(CommandArgs<?,?> args)
Build the operation arguments into the command args.
|
static Apply |
of(String expression,
String name)
Static factory method to create an Apply instance.
|
public static Apply of(String expression, String name)
expression - the expression to applyname - the name of the result fieldpublic void build(CommandArgs<?,?> args)
PostProcessingOperationbuild in interface PostProcessingOperationargs - the command args to build intoCopyright © 2026 lettuce.io. All rights reserved.