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:
Serializable
- Direct Known Subclasses:
FeatureValueSelectField,GenericFunctionSelectField
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 Summary
ConstructorsConstructorDescriptionGenericSelectField(String qualifier) Creates a new select field with empty type identifier and result class.GenericSelectField(String qualifier, Class returnClass) Creates a new select field with empty type identifier.GenericSelectField(String typeIdentifier, String qualifier, Class returnClass) Creates a new select field. -
Method Summary
Modifier and TypeMethodDescriptionGets the configured result class of this select field.protected voidsetReturnClass(Class returnClass) Sets the desired result class for values represented by this select field.voidtoFlexibleSearch(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.Methods inherited from class de.hybris.platform.core.GenericField
getQualifier, getTypeCode, getTypeIdentifier, setQualifier, setTypeIdentifier, toPolyglotSearchMethods inherited from class de.hybris.platform.core.FlexibleSearchTranslatable
getAliasFromTypeMap
-
Constructor Details
-
GenericSelectField
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
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
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 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:
toFlexibleSearchin classGenericField- Parameters:
queryBuffer- contains the querytypeIndexMap- contains typeCode <> typeIndex mappingsvalueMap- contains valueQualifier <> value mappings- See Also:
-
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
Sets the desired result class for values represented by this select field.- Parameters:
returnClass- the result class to use
-