Class CustomConditionBean

  • All Implemented Interfaces:
    java.io.Serializable

    public class CustomConditionBean
    extends FieldResultBean
    A bean that simulates a virtual field. It allows to add advanced filters to a query by assigning a hql-statement to a field of the DDC.
    See Also:
    Serialized Form
    • Field Detail

      • CUSTOM_CONDITION_FIELDTYPE

        public static final int CUSTOM_CONDITION_FIELDTYPE
        Field type used to identify a CustomCondition field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CustomConditionBean

        public CustomConditionBean​(java.lang.String name,
                                   java.lang.String databaseFieldName,
                                   boolean multi,
                                   java.lang.String condition)
        Creates a new CustomConditionBean.
        Parameters:
        name - field name (in DDC)
        databaseFieldName - field name (in database)
        multi - multi-value-field
        condition - HQL statement for condition
    • Method Detail

      • getCustomCondition

        public java.lang.String getCustomCondition()
        Returns:
        the custom condition of this field
      • addParameter

        public void addParameter​(java.lang.String name,
                                 java.lang.Object value)
        Adds a parameter to the query.
        Parameters:
        name - the name
        value - the value
      • getParameters

        public java.util.Map<java.lang.String,​java.lang.Object> getParameters()
        Gets the parameters.
        Returns:
        the parameters
      • setParameters

        public void setParameters​(java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Sets the parameters for the query replacing all previously set parameters.
        Parameters:
        parameters - parameters to set