Interface CalculateColumnValue


public interface CalculateColumnValue

Data source column default value calculator interface

If you want to apply parameters through a DataDescriptor, the column's parameters must contain the name of the class that calculates. This is done by applying a "calculateValue" parameter. Its value must be the full name of the implemented class that does the calculation. That class must implement this interface.

Since:
4.0
Author:
JBStrap
  • Method Summary

    Modifier and Type
    Method
    Description
    The method that calculates the column value
  • Method Details

    • calculateValue

      Object calculateValue(Record rec, CurrentUser user)
      The method that calculates the column value
      Parameters:
      rec - The current record, that has the column. Through the parameter, the full record is accessible, so any of its attributes can be used for the calculation.
      user - The logged in user, that wants to do the calculation. If there is no logged in user, the value will be null. The parameter can handle access rights (if needed) within the calculation.
      Returns:
      The calculated value, that will be set to the field.