@Entity public class FieldImpl extends Object implements Field, Serializable, AdminMainEntity
| Modifier and Type | Field and Description |
|---|---|
protected String |
abbreviation |
protected String |
entityType |
protected String |
facetFieldType |
protected String |
friendlyName |
protected Long |
id |
protected String |
propertyName |
protected Boolean |
searchable |
protected List<String> |
searchableFieldTypes |
protected Boolean |
translatable |
MAIN_ENTITY_NAME_PROPERTY| Constructor and Description |
|---|
FieldImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends Field> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
String |
getAbbreviation()
Gets the abbreviation of this Field.
|
FieldEntity |
getEntityType()
Gets the entityType of this Field
|
FieldType |
getFacetFieldType()
Gets the facet field type.
|
String |
getFriendlyName()
Returns the friendly name of the field, for use by admin or other UI.
|
Long |
getId()
Gets the id
|
String |
getMainEntityName() |
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.
|
Boolean |
getTranslatable()
Returns whether or not this field should be considered translatable
|
void |
setAbbreviation(String abbreviation)
Sets the abbreviation
|
void |
setEntityType(FieldEntity entityType)
Sets the entityType
|
void |
setFacetFieldType(FieldType facetFieldType)
Sets the facet field type
|
void |
setFriendlyName(String friendlyName)
The friendly name of the field, for use by admin or other UI.
|
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.
|
void |
setTranslatable(Boolean translatable)
Sets whether or not this field should be considered translatable
|
protected Long id
protected String entityType
protected String friendlyName
protected String propertyName
protected String abbreviation
protected Boolean searchable
protected String facetFieldType
protected Boolean translatable
public String getQualifiedFieldName()
FieldgetQualifiedFieldName in interface Fieldpublic FieldEntity getEntityType()
FieldgetEntityType in interface Fieldpublic void setEntityType(FieldEntity entityType)
FieldsetEntityType in interface Fieldpublic String getPropertyName()
FieldgetPropertyName in interface Fieldpublic void setPropertyName(String propertyName)
FieldsetPropertyName in interface Fieldpublic String getAbbreviation()
FieldgetAbbreviation in interface Fieldpublic void setAbbreviation(String abbreviation)
FieldsetAbbreviation in interface Fieldpublic String getFriendlyName()
FieldgetFriendlyName in interface Fieldpublic void setFriendlyName(String friendlyName)
FieldsetFriendlyName in interface Fieldpublic Boolean getSearchable()
FieldgetSearchable in interface Fieldpublic void setSearchable(Boolean searchable)
FieldsetSearchable in interface Fieldpublic FieldType getFacetFieldType()
FieldgetFacetFieldType in interface FieldField.getSearchableFieldTypes()public void setFacetFieldType(FieldType facetFieldType)
FieldsetFacetFieldType in interface Fieldpublic List<FieldType> getSearchableFieldTypes()
FieldgetSearchableFieldTypes in interface Fieldpublic void setSearchableFieldTypes(List<FieldType> searchableFieldTypes)
FieldsetSearchableFieldTypes in interface FieldField.getSearchableFieldTypes()public Boolean getTranslatable()
FieldgetTranslatable in interface Fieldpublic void setTranslatable(Boolean translatable)
FieldsetTranslatable in interface Fieldpublic List<SearchConfig> getSearchConfigs()
FieldgetSearchConfigs in interface Fieldpublic void setSearchConfigs(List<SearchConfig> searchConfigs)
FieldsetSearchConfigs in interface Fieldpublic String getMainEntityName()
getMainEntityName in interface AdminMainEntitypublic <G extends Field> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
MultiTenantCloneable
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 {
CreateResponse createResponse = context.createOrRetrieveCopyInstance(this);
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
createOrRetrieveCopyInstance in interface MultiTenantCloneable<Field>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2015. All rights reserved.