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 String
protected String
protected String
protected Long
protected Boolean
protected String
protected Boolean
Fields 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.boolean
Gets 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 translatableint
hashCode()
void
setAbbreviation
(String abbreviation) Sets the abbreviationvoid
setEntityType
(FieldEntity entityType) Sets the entityTypevoid
setFriendlyName
(String friendlyName) The friendly name of the field, for use by admin or other UI.void
Sets the idvoid
setOverrideGeneratedPropertyName
(Boolean overrideGeneratedPropertyName) void
setPropertyName
(String propertyName) Sets the propertyNamevoid
setSearchConfigs
(List<SearchConfig> searchConfigs) Deprecated.void
setTranslatable
(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:Field
Returns the qualified name of this Field. The default implementation returns the entityType joined with the properName by a "."- Specified by:
getQualifiedFieldName
in interfaceField
- Returns:
- the qualifiedFieldName
-
getId
Description copied from interface:Field
Gets the id -
setId
Description copied from interface:Field
Sets the id -
getEntityType
Description copied from interface:Field
Gets the entityType of this Field- Specified by:
getEntityType
in interfaceField
- Returns:
- the entityType
-
setEntityType
Description copied from interface:Field
Sets the entityType- Specified by:
setEntityType
in interfaceField
-
getPropertyName
Description copied from interface:Field
Gets the propertyName of this Field. This would be something like "manufacturer" or "defaultSku.price" if the EntityType was "product"- Specified by:
getPropertyName
in interfaceField
- Returns:
- the propertyName
-
setPropertyName
Description copied from interface:Field
Sets the propertyName- Specified by:
setPropertyName
in interfaceField
-
getOverrideGeneratedPropertyName
- Specified by:
getOverrideGeneratedPropertyName
in interfaceField
-
setOverrideGeneratedPropertyName
- Specified by:
setOverrideGeneratedPropertyName
in interfaceField
-
getAbbreviation
Description copied from interface:Field
Gets the abbreviation of this Field. This will be used in URL query string parameters for sorting and filtering- Specified by:
getAbbreviation
in interfaceField
- Returns:
- the abbreviation
-
setAbbreviation
Description copied from interface:Field
Sets the abbreviation- Specified by:
setAbbreviation
in interfaceField
-
getFriendlyName
Description copied from interface:Field
Returns the friendly name of the field, for use by admin or other UI.- Specified by:
getFriendlyName
in interfaceField
- Returns:
-
setFriendlyName
Description copied from interface:Field
The friendly name of the field, for use by admin or other UI.- Specified by:
setFriendlyName
in interfaceField
-
getTranslatable
Description copied from interface:Field
Returns whether or not this field should be considered translatable- Specified by:
getTranslatable
in interfaceField
- Returns:
- translatable
-
setTranslatable
Description copied from interface:Field
Sets whether or not this field should be considered translatable- Specified by:
setTranslatable
in interfaceField
-
getSearchConfigs
Deprecated.Description copied from interface:Field
Gets the searchConfigs. Note that a concrete implementation or usage of this class is not available in the community version of Broadleaf Commerce.- Specified by:
getSearchConfigs
in interfaceField
- Returns:
- the searchConfigs
-
setSearchConfigs
Deprecated.Description copied from interface:Field
Sets the searchConfigs.- Specified by:
setSearchConfigs
in interfaceField
-
getMainEntityName
- Specified by:
getMainEntityName
in 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:MultiTenantCloneable
Clone 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 { CreateResponse
createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Specified by:
createOrRetrieveCopyInstance
in 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()
-