Class FieldImpl
java.lang.Object
org.broadleafcommerce.core.search.domain.FieldImpl
- All Implemented Interfaces:
Serializable,AdminMainEntity,MultiTenantCloneable<Field>,Field,FieldAdminPresentation
@Entity
public class FieldImpl
extends Object
implements Field, FieldAdminPresentation, AdminMainEntity
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.search.domain.FieldAdminPresentation
FieldAdminPresentation.FieldOrder, FieldAdminPresentation.GroupName, FieldAdminPresentation.GroupOrder, FieldAdminPresentation.TabName, FieldAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected Longprotected Booleanprotected Stringprotected BooleanFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends Field>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.booleanGets the abbreviation of this Field.Gets the entityType of this FieldReturns the friendly name of the field, for use by admin or other UI.getId()Gets the idGets the propertyName of this Field.Returns the qualified name of this Field.Deprecated.Returns whether or not this field should be considered translatableinthashCode()voidsetAbbreviation(String abbreviation) Sets the abbreviationvoidsetEntityType(FieldEntity entityType) Sets the entityTypevoidsetFriendlyName(String friendlyName) The friendly name of the field, for use by admin or other UI.voidSets the idvoidsetOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName) voidsetPropertyName(String propertyName) Sets the propertyNamevoidsetSearchConfigs(List<SearchConfig> searchConfigs) Deprecated.voidsetTranslatable(Boolean translatable) Sets whether or not this field should be considered translatable
-
Field Details
-
id
-
entityType
-
friendlyName
-
propertyName
-
overrideGeneratedPropertyName
-
abbreviation
-
translatable
-
-
Constructor Details
-
FieldImpl
public FieldImpl()
-
-
Method Details
-
getQualifiedFieldName
Description copied from interface:FieldReturns the qualified name of this Field. The default implementation returns the entityType joined with the properName by a "."- Specified by:
getQualifiedFieldNamein interfaceField- Returns:
- the qualifiedFieldName
-
getId
Description copied from interface:FieldGets the id -
setId
Description copied from interface:FieldSets the id -
getEntityType
Description copied from interface:FieldGets the entityType of this Field- Specified by:
getEntityTypein interfaceField- Returns:
- the entityType
-
setEntityType
Description copied from interface:FieldSets the entityType- Specified by:
setEntityTypein interfaceField
-
getPropertyName
Description copied from interface:FieldGets the propertyName of this Field. This would be something like "manufacturer" or "defaultSku.price" if the EntityType was "product"- Specified by:
getPropertyNamein interfaceField- Returns:
- the propertyName
-
setPropertyName
Description copied from interface:FieldSets the propertyName- Specified by:
setPropertyNamein interfaceField
-
getOverrideGeneratedPropertyName
- Specified by:
getOverrideGeneratedPropertyNamein interfaceField
-
setOverrideGeneratedPropertyName
- Specified by:
setOverrideGeneratedPropertyNamein interfaceField
-
getAbbreviation
Description copied from interface:FieldGets the abbreviation of this Field. This will be used in URL query string parameters for sorting and filtering- Specified by:
getAbbreviationin interfaceField- Returns:
- the abbreviation
-
setAbbreviation
Description copied from interface:FieldSets the abbreviation- Specified by:
setAbbreviationin interfaceField
-
getFriendlyName
Description copied from interface:FieldReturns the friendly name of the field, for use by admin or other UI.- Specified by:
getFriendlyNamein interfaceField- Returns:
-
setFriendlyName
Description copied from interface:FieldThe friendly name of the field, for use by admin or other UI.- Specified by:
setFriendlyNamein interfaceField
-
getTranslatable
Description copied from interface:FieldReturns whether or not this field should be considered translatable- Specified by:
getTranslatablein interfaceField- Returns:
- translatable
-
setTranslatable
Description copied from interface:FieldSets whether or not this field should be considered translatable- Specified by:
setTranslatablein interfaceField
-
getSearchConfigs
Deprecated.Description copied from interface:FieldGets the searchConfigs. Note that a concrete implementation or usage of this class is not available in the community version of Broadleaf Commerce.- Specified by:
getSearchConfigsin interfaceField- Returns:
- the searchConfigs
-
setSearchConfigs
Deprecated.Description copied from interface:FieldSets the searchConfigs.- Specified by:
setSearchConfigsin interfaceField
-
getMainEntityName
- Specified by:
getMainEntityNamein interfaceAdminMainEntity- Returns:
- the display name of this entity for the admin screen
-
createOrRetrieveCopyInstance
public <G extends Field> 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();Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
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<Field>- 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()
-