Package org.ametys.cms.search.solr.field
Class AbstractMetadataSearchField
- java.lang.Object
-
- org.ametys.cms.search.solr.field.AbstractMetadataSearchField
-
- All Implemented Interfaces:
SearchField
- Direct Known Subclasses:
BooleanSearchField
,DateSearchField
,DoubleSearchField
,LongSearchField
,MultilingualStringSearchField
,StringSearchField
public abstract class AbstractMetadataSearchField extends Object implements SearchField
Metadata (abstract) generic search field.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
_joinPaths
The join pathsprotected String
_path
The field path.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractMetadataSearchField(String path)
Build a Metadata SearchFieldprotected
AbstractMetadataSearchField(List<String> joinPaths, String finalPath)
Build a Metadata SearchField
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
_getFacetFieldSuffix()
Get the facet field suffix corresponding to this field.protected abstract String
_getSortFieldSuffix()
Get the sort field suffix corresponding to this field.String
getFacetField()
Get the facet field corresponding to this field.List<String>
getJoinedPaths()
Gets the joined pathsString
getName()
Get the search field name.String
getSortField()
Get the sort field corresponding to this field.boolean
isJoined()
Indicates if the search field is joined-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.cms.search.SearchField
getFacetFunction
-
-
-
-
Field Detail
-
_joinPaths
protected List<String> _joinPaths
The join paths
-
-
Constructor Detail
-
AbstractMetadataSearchField
protected AbstractMetadataSearchField(String path)
Build a Metadata SearchField- Parameters:
path
- The field path
-
AbstractMetadataSearchField
protected AbstractMetadataSearchField(List<String> joinPaths, String finalPath)
Build a Metadata SearchField- Parameters:
joinPaths
- The join field pathsfinalPath
- The final field path
-
-
Method Detail
-
getSortField
public String getSortField()
Description copied from interface:SearchField
Get the sort field corresponding to this field.- Specified by:
getSortField
in interfaceSearchField
- Returns:
- The sort field.
-
_getSortFieldSuffix
protected abstract String _getSortFieldSuffix()
Get the sort field suffix corresponding to this field. Return null if not sortable.- Returns:
- the sort field suffix. Null if not sortable.
-
isJoined
public boolean isJoined()
Description copied from interface:SearchField
Indicates if the search field is joined- Specified by:
isJoined
in interfaceSearchField
- Returns:
true
if the search field is joined
-
getJoinedPaths
public List<String> getJoinedPaths()
Description copied from interface:SearchField
Gets the joined paths- Specified by:
getJoinedPaths
in interfaceSearchField
- Returns:
- the joined paths
-
getFacetField
public String getFacetField()
Description copied from interface:SearchField
Get the facet field corresponding to this field.- Specified by:
getFacetField
in interfaceSearchField
- Returns:
- The facet field.
-
_getFacetFieldSuffix
protected abstract String _getFacetFieldSuffix()
Get the facet field suffix corresponding to this field. Return null if not facetable.- Returns:
- the facet field suffix. Null if not facetable.
-
getName
public String getName()
Description copied from interface:SearchField
Get the search field name.- Specified by:
getName
in interfaceSearchField
- Returns:
- The search field name.
-
-