Class IndexFieldImpl
java.lang.Object
org.broadleafcommerce.core.search.domain.IndexFieldImpl
- All Implemented Interfaces:
Serializable,AdminMainEntity,MultiTenantCloneable<IndexField>,IndexField,IndexFieldAdminPresentation
@Entity
public class IndexFieldImpl
extends Object
implements IndexField, Serializable, IndexFieldAdminPresentation, AdminMainEntity
- Author:
- Chad Harchar (charchar)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.search.domain.IndexFieldAdminPresentation
IndexFieldAdminPresentation.FieldOrder, IndexFieldAdminPresentation.GroupName, IndexFieldAdminPresentation.GroupOrder, IndexFieldAdminPresentation.TabName, IndexFieldAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Fieldprotected List<IndexFieldType>protected Longprotected BooleanFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends IndexField>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.booleangetField()Gets the field for this search fieldGets the searchable field types for this search fieldgetId()Gets the id for this search fieldWhether or not the user should see results for this field when typing in search terms in the omnibox, or if this is just a field stored in the index (like margin or sorts)inthashCode()voidSets the field for this search fieldvoidsetFieldTypes(List<IndexFieldType> fieldTypes) Sets the searchable field types for this search fieldvoidSets the id for this search fieldvoidsetSearchable(Boolean searchable)
-
Field Details
-
id
-
searchable
-
field
-
fieldTypes
-
-
Constructor Details
-
IndexFieldImpl
public IndexFieldImpl()
-
-
Method Details
-
getId
Description copied from interface:IndexFieldGets the id for this search field- Specified by:
getIdin interfaceIndexField- Returns:
-
setId
Description copied from interface:IndexFieldSets the id for this search field- Specified by:
setIdin interfaceIndexField
-
getSearchable
Description copied from interface:IndexFieldWhether or not the user should see results for this field when typing in search terms in the omnibox, or if this is just a field stored in the index (like margin or sorts)- Specified by:
getSearchablein interfaceIndexField
-
setSearchable
- Specified by:
setSearchablein interfaceIndexField
-
getField
Description copied from interface:IndexFieldGets the field for this search field- Specified by:
getFieldin interfaceIndexField- Returns:
-
setField
Description copied from interface:IndexFieldSets the field for this search field- Specified by:
setFieldin interfaceIndexField
-
getFieldTypes
Description copied from interface:IndexFieldGets the searchable field types for this search field- Specified by:
getFieldTypesin interfaceIndexField- Returns:
-
setFieldTypes
Description copied from interface:IndexFieldSets the searchable field types for this search field- Specified by:
setFieldTypesin interfaceIndexField
-
createOrRetrieveCopyInstance
public <G extends IndexField> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneableClone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here return createResponse; }Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponsecreateResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here return createResponse; } - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<IndexField>- Parameters:
context- a context object providing persistence and library functionality for copying entities- Returns:
- the resulting copy container, possibly already persisted
- Throws:
CloneNotSupportedException- if there's a problem detected with the cloning configuration
-
equals
-
hashCode
public int hashCode() -
getMainEntityName
- Specified by:
getMainEntityNamein interfaceAdminMainEntity- Returns:
- the display name of this entity for the admin screen
-