@Entity public class FieldImpl extends Object implements Field, FieldAdminPresentation, AdminMainEntity
FieldAdminPresentation.FieldOrder, FieldAdminPresentation.GroupName, FieldAdminPresentation.GroupOrder, FieldAdminPresentation.TabName, FieldAdminPresentation.TabOrder| Modifier and Type | Field and Description |
|---|---|
protected String |
abbreviation |
protected String |
entityType |
protected String |
friendlyName |
protected Long |
id |
protected Boolean |
overrideGeneratedPropertyName |
protected String |
propertyName |
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
|
String |
getFriendlyName()
Returns the friendly name of the field, for use by admin or other UI.
|
Long |
getId()
Gets the id
|
String |
getMainEntityName() |
Boolean |
getOverrideGeneratedPropertyName() |
String |
getPropertyName()
Gets the propertyName of this Field.
|
String |
getQualifiedFieldName()
Returns the qualified name of this Field.
|
List<SearchConfig> |
getSearchConfigs()
Deprecated.
|
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 |
setFriendlyName(String friendlyName)
The friendly name of the field, for use by admin or other UI.
|
void |
setId(Long id)
Sets the id
|
void |
setOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName) |
void |
setPropertyName(String propertyName)
Sets the propertyName
|
void |
setSearchConfigs(List<SearchConfig> searchConfigs)
Deprecated.
|
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 Boolean overrideGeneratedPropertyName
protected String abbreviation
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 Boolean getOverrideGeneratedPropertyName()
getOverrideGeneratedPropertyName in interface Fieldpublic void setOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName)
setOverrideGeneratedPropertyName 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 getTranslatable()
FieldgetTranslatable in interface Fieldpublic void setTranslatable(Boolean translatable)
FieldsetTranslatable in interface Field@Deprecated public List<SearchConfig> getSearchConfigs()
FieldgetSearchConfigs in interface Field@Deprecated public 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 © 2020. All rights reserved.