Class GenericSelectField

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    FeatureValueSelectField, GenericFunctionSelectField

    public class GenericSelectField
    extends GenericField
    Kind of Field used within a SELECT clause. When you think of a SELECT clause like SELECT User.UID FROM User this field represents the User.UID. Consists of a type identifier like User, a qualifier like UID which identifies an attribute of the type and which will be selected, and the resulting type like User.class or PK.class (dependent on desire and compatibility).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericSelectField​(java.lang.String qualifier)
      Creates a new select field with empty type identifier and result class.
      GenericSelectField​(java.lang.String qualifier, java.lang.Class returnClass)
      Creates a new select field with empty type identifier.
      GenericSelectField​(java.lang.String typeIdentifier, java.lang.String qualifier, java.lang.Class returnClass)
      Creates a new select field.
    • Constructor Detail

      • GenericSelectField

        public GenericSelectField​(java.lang.String qualifier)
        Creates a new select field with empty type identifier and result class. Here the attribute qualifier can not be ambiguous concerning the types of query. An empty result class may only be omitted in subqueries.
        Parameters:
        qualifier - attribute qualifier of attribute which will be selected
      • GenericSelectField

        public GenericSelectField​(java.lang.String qualifier,
                                  java.lang.Class returnClass)
        Creates a new select field with empty type identifier. Here the attribute qualifier can not be ambiguous concerning the types of query.
        Parameters:
        qualifier - attribute qualifier of attribute which will be selected
        returnClass - desired resulting class of this select field - gathered value will be tried to converted to this class
      • GenericSelectField

        public GenericSelectField​(java.lang.String typeIdentifier,
                                  java.lang.String qualifier,
                                  java.lang.Class returnClass)
        Creates a new select field.
        Parameters:
        qualifier - attribute qualifier of attribute which will be selected
        returnClass - desired resulting class of this select field - gathered value will be tried to converted to this class
    • 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)
        Converts the select field to flexible search syntax by surrounding the generic field within curly braces.
        Overrides:
        toFlexibleSearch in class GenericField
        Parameters:
        queryBuffer - contains the query
        typeIndexMap - contains typeCode <> typeIndex mappings
        valueMap - contains valueQualifier <> value mappings
        See Also:
        FlexibleSearchTranslatable.toFlexibleSearch(java.lang.StringBuilder, Map, Map)
      • getReturnClass

        public java.lang.Class getReturnClass()
        Gets the configured result class of this select field. The class represents the desired class a gathered value will be converted to.
        Returns:
        result class the value will be converted to
      • setReturnClass

        protected void setReturnClass​(java.lang.Class returnClass)
        Sets the desired result class for values represented by this select field.
        Parameters:
        returnClass - the result class to use