Class ValueBehaviorApplier

java.lang.Object
com.kingsrook.qqq.backend.core.actions.values.ValueBehaviorApplier

public class ValueBehaviorApplier extends Object
Utility class to apply value behaviors to records.
  • Constructor Details

    • ValueBehaviorApplier

      public ValueBehaviorApplier()
  • Method Details

    • applyFieldBehaviors

      public static void applyFieldBehaviors(ValueBehaviorApplier.Action action, QInstance instance, QTableMetaData table, List<QRecord> recordList, Set<FieldBehavior<?>> behaviorsToOmit)
    • applyFieldBehaviorsToFilter

      public static QQueryFilter applyFieldBehaviorsToFilter(QInstance instance, QTableMetaData table, QQueryFilter filter, Set<FieldBehavior<?>> behaviorsToOmit)
      apply field behaviors (of FieldFilterBehavior type) to a QQueryFilter. note that, we don't like to ever edit a QQueryFilter itself (e.g., as it might have come from meta-data, or it might have some immutable structures in it). So, if any changes are needed, they'll be returned in a clone. So, either way, you should use this method like: QQueryFilter myFilter = // wherever I got my filter from myFilter = ValueBehaviorApplier.applyFieldBehaviorsToFilter(QContext.getInstance, table, myFilter, null); // e.g., always re-assign over top of your filter.
    • apply

      public static QFilterCriteria apply(QFilterCriteria criteria, QInstance instance, QTableMetaData table, QFieldMetaData field, FieldFilterBehavior<?> filterBehavior)