org.broadleafcommerce.core.search.domain
Interface Field

All Known Implementing Classes:
FieldImpl

public interface Field

Represents a String-based mapping of entities and properties. This is used in various places, including search facets and report fields.

Author:
Andre Azzolini (apazzolini)

Method Summary
 String getAbbreviation()
          Gets the abbreviation of this Field.
 FieldEntity getEntityType()
          Gets the entityType of this Field
 FieldType getFacetFieldType()
          Gets the facet field type.
 Long getId()
          Gets the id
 String getPropertyName()
          Gets the propertyName of this Field.
 String getQualifiedFieldName()
          Returns the qualified name of this Field.
 Boolean getSearchable()
          Gets the searchable flag
 List<FieldType> getSearchableFieldTypes()
          Gets the dynamic searchable field types.
 List<SearchConfig> getSearchConfigs()
          Gets the searchConfigs.
 void setAbbreviation(String abbreviation)
          Sets the abbreviation
 void setEntityType(FieldEntity entityType)
          Sets the entityType
 void setFacetFieldType(FieldType facetFieldType)
          Sets the facet field type
 void setId(Long id)
          Sets the id
 void setPropertyName(String propertyName)
          Sets the propertyName
 void setSearchable(Boolean searchable)
          Sets the searchable flag
 void setSearchableFieldTypes(List<FieldType> searchableFieldTypes)
          Sets the searchableFieldTypes
 void setSearchConfigs(List<SearchConfig> searchConfigs)
          Sets the searchConfigs.
 

Method Detail

getId

Long getId()
Gets the id

Returns:
the id

setId

void setId(Long id)
Sets the id

Parameters:
id -

getEntityType

FieldEntity getEntityType()
Gets the entityType of this Field

Returns:
the entityType

setEntityType

void setEntityType(FieldEntity entityType)
Sets the entityType

Parameters:
entityType -

getPropertyName

String getPropertyName()
Gets the propertyName of this Field. This would be something like "manufacturer" or "defaultSku.price" if the EntityType was "product"

Returns:
the propertyName

setPropertyName

void setPropertyName(String propertyName)
Sets the propertyName

Parameters:
propertyName -

getAbbreviation

String getAbbreviation()
Gets the abbreviation of this Field. This will be used in URL query string parameters for sorting and filtering

Returns:
the abbreviation

setAbbreviation

void setAbbreviation(String abbreviation)
Sets the abbreviation

Parameters:
abbreviation -

getSearchable

Boolean getSearchable()
Gets the searchable flag

Returns:
whether or not this Field is searchable

setSearchable

void setSearchable(Boolean searchable)
Sets the searchable flag

Parameters:
searchable -

setFacetFieldType

void setFacetFieldType(FieldType facetFieldType)
Sets the facet field type

Parameters:
facetFieldType -

getFacetFieldType

FieldType getFacetFieldType()
Gets the facet field type. Note that the facet field type is also the type used to perform sorting. Any field where there is a desire to facet or sort on should have this FieldType specified.

Returns:
the facet field type
See Also:
getSearchableFieldTypes()

setSearchableFieldTypes

void setSearchableFieldTypes(List<FieldType> searchableFieldTypes)
Sets the searchableFieldTypes

Parameters:
searchableFieldTypes -
See Also:
getSearchableFieldTypes()

getSearchableFieldTypes

List<FieldType> getSearchableFieldTypes()
Gets the dynamic searchable field types. For example, in solr, if you wanted to index a field as both text and string, you would have two searchable field types, String and Text

Returns:
the searchable types for this field

getSearchConfigs

List<SearchConfig> getSearchConfigs()
Gets the searchConfigs. Note that a concrete implementation or usage of this class is not available in the community version of Broadleaf Commerce.

Returns:
the searchConfigs

setSearchConfigs

void setSearchConfigs(List<SearchConfig> searchConfigs)
Sets the searchConfigs.

Parameters:
searchConfigs -

getQualifiedFieldName

String getQualifiedFieldName()
Returns the qualified name of this Field. The default implementation returns the entityType joined with the properName by a "."

Returns:
the qualifiedFieldName


Copyright © 2013. All Rights Reserved.