Class TranslatedQuery

  • All Implemented Interfaces:
    java.io.Serializable

    public class TranslatedQuery
    extends java.lang.Object
    implements java.io.Serializable
    final form of parsed query. this one hold the plain sql text and a value mapping which allows expansion of user value lists for repeated execution with different values.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TranslatedQuery​(java.lang.String sql, java.util.List<java.lang.Object> valueMappings, java.util.List<java.lang.Integer> valuePositions, boolean needLanguage, java.util.Set<PK> typePKs, java.util.Map<java.lang.Integer,​java.lang.Object> fixed, boolean cloned, boolean cacheStatement)  
    • Constructor Detail

      • TranslatedQuery

        public TranslatedQuery​(java.lang.String sql,
                               java.util.List<java.lang.Object> valueMappings,
                               java.util.List<java.lang.Integer> valuePositions,
                               boolean needLanguage,
                               java.util.Set<PK> typePKs,
                               java.util.Map<java.lang.Integer,​java.lang.Object> fixed,
                               boolean cloned,
                               boolean cacheStatement)
    • Method Detail

      • getValuePositions

        public java.util.List getValuePositions()
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • cacheStatement

        public boolean cacheStatement()
      • getSQLTemplate

        public java.lang.String getSQLTemplate()
      • getTypePKs

        public java.util.Set<PK> getTypePKs()
        Returns:
        a list of pk strings
      • getValueKeys

        public java.util.List getValueKeys()
      • needLanguage

        public boolean needLanguage()
      • getPositionMap

        public final java.util.Map getPositionMap​(java.util.Map values)
        Assembles a map holding a position list for each value key of the given value map.
      • getAllValues

        protected java.util.Map getAllValues​(java.util.Map callerValues)
      • expandValues

        public final TranslatedQuery.ExecutableQuery expandValues​(java.util.Map _values,
                                                                  PK defaultLanguagePK)
        expands this values according to the '?' included in this parsed query.
      • getMissingParameters

        protected java.util.Collection<java.lang.String> getMissingParameters​(java.util.Collection<de.hybris.platform.persistence.flexiblesearch.TranslatedQuery.ValueMapper> mappings)
      • createValueMappers

        protected java.util.List<de.hybris.platform.persistence.flexiblesearch.TranslatedQuery.ValueMapper> createValueMappers​(java.util.Map userValues,
                                                                                                                               PK defaultLanguagePK)
                                                                                                                        throws FlexibleSearchException
        Throws:
        FlexibleSearchException
      • countParameters

        protected int countParameters​(java.util.Map values)