Class TranslatedQuery
- java.lang.Object
-
- de.hybris.platform.persistence.flexiblesearch.TranslatedQuery
-
- All Implemented Interfaces:
java.io.Serializable
public class TranslatedQuery extends java.lang.Object implements java.io.Serializablefinal 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTranslatedQuery.ExecutableQuerystatic classTranslatedQuery.OrderByClauseInfo
-
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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancacheStatement()java.lang.Objectclone()protected intcountParameters(java.util.Map values)protected java.util.List<de.hybris.platform.persistence.flexiblesearch.TranslatedQuery.ValueMapper>createValueMappers(java.util.Map userValues, PK defaultLanguagePK)TranslatedQuery.ExecutableQueryexpandValues(java.util.Map _values, PK defaultLanguagePK)expands this values according to the '?'included in this parsed query. protected java.util.MapgetAllValues(java.util.Map callerValues)protected java.util.Collection<java.lang.String>getMissingParameters(java.util.Collection<de.hybris.platform.persistence.flexiblesearch.TranslatedQuery.ValueMapper> mappings)java.util.MapgetPositionMap(java.util.Map values)Assembles a map holding a position list for each value key of the given value map.java.lang.StringgetSQLTemplate()java.util.Set<PK>getTypePKs()java.util.ListgetValueKeys()java.util.ListgetValuePositions()booleanneedLanguage()java.util.MapremoveUnusedValues(java.util.Map _values)
-
-
-
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:
clonein classjava.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()
-
removeUnusedValues
public final java.util.Map removeUnusedValues(java.util.Map _values) throws FlexibleSearchException- Throws:
FlexibleSearchException
-
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)
-
-