Class ParsedSubtype
java.lang.Object
de.hybris.platform.persistence.flexiblesearch.ParsedSubtype
subtype of a parsed type. is is used for getting all subtype restrictions and building UNION queries if the actual
parsed type is abstract.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<AbstractQueryFilter>checkRestrictions(ComposedType myType, Collection<AbstractQueryFilter> res) protected voidno-op since subtypes dont need to be checkedprotected voidprotected booleanbooleanprotected Collection<AbstractQueryFilter>filterOverloadedRestrictions(Map<PK, Collection<AbstractQueryFilter>> typeToRestrictionsMap) protected Collectionincludes its supertype restrictions too.protected StringBuilderprotected Stringprotected de.hybris.platform.persistence.flexiblesearch.TableDelegated to supertype since all tables are handled there.Delegated to supertype since all tables are handled there.protected de.hybris.platform.persistence.flexiblesearch.TableDelegated to supertype since all tables are handled there.protected MapDelegated to supertype since all tables are handled there.protected de.hybris.platform.persistence.flexiblesearch.ParsedTextprotected Stringprotected Set<ComposedType>getExcludedSubtypesFromRestriction(AbstractQueryFilter abstractQueryFilter, Collection<AbstractQueryFilter> all) protected FlexibleSearchTypeCacheProviderprotected de.hybris.platform.persistence.flexiblesearch.TableDelegated to supertype since all tables are handled there.protected List<? extends de.hybris.platform.persistence.flexiblesearch.ParsedText>protected de.hybris.platform.persistence.flexiblesearch.TableDelegated to supertype since all tables are handled there.protected de.hybris.platform.persistence.flexiblesearch.TablegetOrCreateDumpTable(de.hybris.platform.persistence.flexiblesearch.TableField field) Delegated to supertype since all tables are handled there.protected de.hybris.platform.persistence.flexiblesearch.TablegetOrCreateLocalizedTable(de.hybris.platform.persistence.flexiblesearch.TableField field) Delegated to supertype since all tables are handled there.protected de.hybris.platform.persistence.flexiblesearch.TablegetOrCreateUnlocalizedTable(de.hybris.platform.persistence.flexiblesearch.TableField field) protected Collectionprotected de.hybris.platform.persistence.flexiblesearch.ParsedTypeprotected Set<AbstractQueryFilter>protected de.hybris.platform.persistence.flexiblesearch.TableDelegated to supertype since all tables are handled there.protected Stringprotected final Collectionsubtypes must not include their supertype restrictions - so this method always returns an empty collection.protected de.hybris.platform.persistence.flexiblesearch.TableDelegated to supertype since all tables are handled there.protected static final intgetWholeWordTokenPosition(String src, String token) protected static final intgetWholeWordTokenPosition(String src, String token, int startFrom) inthashCode()protected booleanprotected voidinsertIntoTranslated(int pos, String text) protected voidregisterParsedText(de.hybris.platform.persistence.flexiblesearch.ParsedText parsed) protected voidreplaceInTranslated(de.hybris.platform.persistence.flexiblesearch.TableField field, String text) Replaces a substring of this parsed text by a new text.protected voidreplaceInTranslated(String old, String text) protected StringBuildersetBuffer(StringBuilder buffer) protected voidsetCoreTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there.protected voidsetCustomLocTables(Map<PK, de.hybris.platform.persistence.flexiblesearch.Table> map) Delegated to supertype since all tables are handled there.protected voidsetDefaultLocTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there.protected voidsetDumpTables(Map map) Delegated to supertype since all tables are handled there.protected voidsetIgnoreLocTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there.protected voidsetRestrictions(Collection<RestrictionClause> restrictionClauses) protected voidprotected voidsetSpecialFieldsTable(de.hybris.platform.persistence.flexiblesearch.Table sft) Delegated to supertype since all tables are handled there.protected voidsetSubtypes(Collection<ParsedSubtype> subtypes) protected voidsetUnlocTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there.static String[]splitTypeExpression(String expr) Splits a type expression with this structure:toString()protected voidtype only does a single pass !protected de.hybris.platform.persistence.flexiblesearch.ParsedTexttranslateNested(int resultInsertPos, String selectedText) just returns this field now.protected void
-
Field Details
-
AS
-
MATCH_TYPE_EXACT
- See Also:
-
MATCH_SUBTYPES
- See Also:
-
MATCH_ALL_TYPES
- See Also:
-
MATCH_DEPLOYMENT_TYPES
- See Also:
-
-
Method Details
-
createParsedSubtypesAndRestrictionClauses
protected void createParsedSubtypesAndRestrictionClauses() -
checkType
no-op since subtypes dont need to be checked- Throws:
FlexibleSearchException
-
getApplicableRestrictions
includes its supertype restrictions too.- Returns:
- all restrictions which apply to this type
- Throws:
FlexibleSearchException
-
getSuperTypeRealRestrictions
subtypes must not include their supertype restrictions - so this method always returns an empty collection. -
getSpecialFieldsTable
protected de.hybris.platform.persistence.flexiblesearch.Table getSpecialFieldsTable()Delegated to supertype since all tables are handled there. -
setSpecialFieldsTable
protected void setSpecialFieldsTable(de.hybris.platform.persistence.flexiblesearch.Table sft) Delegated to supertype since all tables are handled there. -
getCustomLocTables
Delegated to supertype since all tables are handled there. -
setCustomLocTables
Delegated to supertype since all tables are handled there. -
getDumpTables
Delegated to supertype since all tables are handled there. -
setDumpTables
Delegated to supertype since all tables are handled there. -
getCoreTable
protected de.hybris.platform.persistence.flexiblesearch.Table getCoreTable()Delegated to supertype since all tables are handled there. -
setCoreTable
protected void setCoreTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there. -
getUnlocTable
protected de.hybris.platform.persistence.flexiblesearch.Table getUnlocTable()Delegated to supertype since all tables are handled there. -
setUnlocTable
protected void setUnlocTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there. -
getDefaultLocTable
protected de.hybris.platform.persistence.flexiblesearch.Table getDefaultLocTable()Delegated to supertype since all tables are handled there. -
setDefaultLocTable
protected void setDefaultLocTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there. -
getIgnoreLocTable
protected de.hybris.platform.persistence.flexiblesearch.Table getIgnoreLocTable()Delegated to supertype since all tables are handled there. -
setIgnoreLocTable
protected void setIgnoreLocTable(de.hybris.platform.persistence.flexiblesearch.Table table) Delegated to supertype since all tables are handled there. -
getOrCreateCoreTable
protected de.hybris.platform.persistence.flexiblesearch.Table getOrCreateCoreTable()Delegated to supertype since all tables are handled there.- Returns:
- the core table of this type. if it not existed before it will be created.
-
getOrCreateDumpTable
protected de.hybris.platform.persistence.flexiblesearch.Table getOrCreateDumpTable(de.hybris.platform.persistence.flexiblesearch.TableField field) throws FlexibleSearchException Delegated to supertype since all tables are handled there.- Parameters:
field- the field to create the dump table for- Returns:
- the dump table for the given arguments of this type. if it not existed before it will be created.
- Throws:
FlexibleSearchException
-
getOrCreateLocalizedTable
protected de.hybris.platform.persistence.flexiblesearch.Table getOrCreateLocalizedTable(de.hybris.platform.persistence.flexiblesearch.TableField field) throws FlexibleSearchException Delegated to supertype since all tables are handled there.- Parameters:
field- the field to create a LP table for- Returns:
- the localized table for the given arguments of this type. if it not existed before it will be created.
- Throws:
FlexibleSearchException
-
getPlaceholderType
protected de.hybris.platform.persistence.flexiblesearch.ParsedType getPlaceholderType() -
translate
type only does a single pass !- Throws:
FlexibleSearchException
-
checkRestrictions
protected Collection<AbstractQueryFilter> checkRestrictions(ComposedType myType, Collection<AbstractQueryFilter> res) -
getExcludedSubtypesFromRestriction
protected Set<ComposedType> getExcludedSubtypesFromRestriction(AbstractQueryFilter abstractQueryFilter, Collection<AbstractQueryFilter> all) -
getSameCodeRestrictions
protected Set<AbstractQueryFilter> getSameCodeRestrictions(AbstractQueryFilter filter, Collection<AbstractQueryFilter> all) -
filterOverloadedRestrictions
protected Collection<AbstractQueryFilter> filterOverloadedRestrictions(Map<PK, Collection<AbstractQueryFilter>> typeToRestrictionsMap) -
setRestrictions
-
setSubtypes
-
getOwnRestrictions
- Returns:
- this types restrictions
- Throws:
FlexibleSearchException
-
splitTypeExpression
Splits a type expression with this structure:typeCode + ('!'|'*'|'^')? + ( ' AS ' + alias )?- Parameters:
expr- the type expression to split- Returns:
- [ typeCode, MATCH_TYPE_EXACT|MATCH_SUBTYPES|MATCH_ALL_TYPES|MATCH_DEPLOYMENT_TYPES, alias|null ]
-
hashCode
public int hashCode() -
equals
-
toString
-
translateRestrictionsAndSubtypes
- Throws:
FlexibleSearchException
-
getOrCreateUnlocalizedTable
protected de.hybris.platform.persistence.flexiblesearch.Table getOrCreateUnlocalizedTable(de.hybris.platform.persistence.flexiblesearch.TableField field) - Returns:
- the unlocalized table of this type. if it not existed before it will be created.
-
translateNested
protected de.hybris.platform.persistence.flexiblesearch.ParsedText translateNested(int resultInsertPos, String selectedText) throws FlexibleSearchException just returns this field now. override for you own handling of these texts.- Parameters:
resultInsertPos- the position where the result of this method is placed in the translated textselectedText- the selected text from source- Throws:
FlexibleSearchException
-
disableTypeChecks
protected boolean disableTypeChecks() -
getFSTypeCacheProvider
-
getWholeWordTokenPosition
-
getWholeWordTokenPosition
-
setSource
-
getEnclosingText
protected de.hybris.platform.persistence.flexiblesearch.ParsedText getEnclosingText() -
getNestedTexts
-
hasNestedTexts
protected boolean hasNestedTexts() -
getBuffer
-
setBuffer
-
getStartDelimiter
-
getEndDelimiter
-
replaceInTranslated
-
insertIntoTranslated
-
replaceInTranslated
protected void replaceInTranslated(de.hybris.platform.persistence.flexiblesearch.TableField field, String text) Replaces a substring of this parsed text by a new text.- Parameters:
text- the new text to insert
-
registerParsedText
protected void registerParsedText(de.hybris.platform.persistence.flexiblesearch.ParsedText parsed) -
getCleanSource
-