Package de.hybris.platform.core
Class GenericSelectField
- java.lang.Object
-
- de.hybris.platform.core.FlexibleSearchTranslatable
-
- de.hybris.platform.core.GenericField
-
- de.hybris.platform.core.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 likeSELECT User.UID FROM Userthis field represents theUser.UID. Consists of a type identifier likeUser, a qualifier likeUIDwhich identifies an attribute of the type and which will be selected, and the resulting type likeUser.classorPK.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ClassgetReturnClass()Gets the configured result class of this select field.protected voidsetReturnClass(java.lang.Class returnClass)Sets the desired result class for values represented by this select field.voidtoFlexibleSearch(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.-
Methods inherited from class de.hybris.platform.core.GenericField
getQualifier, getTypeCode, getTypeIdentifier, setQualifier, setTypeIdentifier, toPolyglotSearch
-
Methods inherited from class de.hybris.platform.core.FlexibleSearchTranslatable
getAliasFromTypeMap
-
-
-
-
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 selectedreturnClass- 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 selectedreturnClass- 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:
toFlexibleSearchin classGenericField- Parameters:
queryBuffer- contains the querytypeIndexMap- contains typeCode <> typeIndex mappingsvalueMap- 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
-
-