Class GenericFunctionSelectField

  • All Implemented Interfaces:
    java.io.Serializable

    public class GenericFunctionSelectField
    extends GenericSelectField
    Allows to specify a function to be applied to a generic select field.

    Example:

    To get a query like this:

            SELECT MAX( {code} ) FROM {Product} ...
     

    you do this:

     GenericQuery q = new GenericQuery("Product");
    
     q.addSelectField(new GenericFunctionSelectField("code", "MAX"));
     
    See Also:
    Serialized Form
    • Constructor Detail

      • GenericFunctionSelectField

        public GenericFunctionSelectField​(java.lang.String qualifier,
                                          java.lang.String functionName)
      • GenericFunctionSelectField

        public GenericFunctionSelectField​(java.lang.String qualifier,
                                          java.lang.Class returnClass,
                                          java.lang.String functionName)
      • GenericFunctionSelectField

        public GenericFunctionSelectField​(java.lang.String typeIndentifier,
                                          java.lang.String qualifier,
                                          java.lang.Class returnClass,
                                          java.lang.String functionName)
    • Method Detail

      • toFlexibleSearch

        public void toFlexibleSearch​(java.lang.StringBuilder queryBuffer,
                                     java.util.Map<java.lang.String,​java.lang.String> typeIndexMap,
                                     java.util.Map<java.lang.String,​java.lang.Object> valueMap)
        Description copied from class: GenericSelectField
        Converts the select field to flexible search syntax by surrounding the generic field within curly braces.
        Overrides:
        toFlexibleSearch in class GenericSelectField
        Parameters:
        queryBuffer - contains the query
        typeIndexMap - contains typeCode <> typeIndex mappings
        valueMap - contains valueQualifier <> value mappings
        See Also:
        FlexibleSearchTranslatable.toFlexibleSearch(java.lang.StringBuilder, Map, Map)