Class GenericSelectField

All Implemented Interfaces:
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:
  • Constructor Details

    • GenericSelectField

      public GenericSelectField(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(String qualifier, 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(String typeIdentifier, String qualifier, 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 Details

    • toFlexibleSearch

      public void toFlexibleSearch(StringBuilder queryBuffer, Map<String,String> typeIndexMap, Map<String,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:
    • getReturnClass

      public 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(Class returnClass)
      Sets the desired result class for values represented by this select field.
      Parameters:
      returnClass - the result class to use