@Entity public class SystemPropertyImpl extends Object implements SystemProperty, AdminMainEntity, SystemPropertyAdminPresentation
SystemPropertyAdminPresentation.FieldOrder, SystemPropertyAdminPresentation.GroupName, SystemPropertyAdminPresentation.GroupOrder, SystemPropertyAdminPresentation.TabName, SystemPropertyAdminPresentation.TabOrder| Modifier and Type | Field and Description |
|---|---|
protected String |
friendlyGroup |
protected String |
friendlyName |
protected String |
friendlyTab |
protected Long |
id |
protected String |
name |
protected Boolean |
overrideGeneratedPropertyName |
protected String |
propertyType |
protected String |
value |
MAIN_ENTITY_NAME_PROPERTY| Constructor and Description |
|---|
SystemPropertyImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends SystemProperty> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
String |
getFriendlyGroup() |
String |
getFriendlyName() |
String |
getFriendlyTab() |
Long |
getId()
Unique id of the DB record
|
String |
getMainEntityName() |
String |
getName()
The name of the property as it exists in property files (for example googleAnalytics.webPropertyId)
|
Boolean |
getOverrideGeneratedPropertyName()
Declares whether or not the property name has been overridden, rather than using the default generated value.
|
SystemPropertyFieldType |
getPropertyType()
Returns the property field type.
|
String |
getValue()
Returns the property value.
|
int |
hashCode() |
void |
setFriendlyGroup(String friendlyGroup)
Sets the friendly group name of this property
|
void |
setFriendlyName(String friendlyName)
Sets the friendly name of this property
|
void |
setFriendlyTab(String friendlyTab)
Sets the friendly tab of this property
|
void |
setId(Long id)
Sets the id of the DB record
|
void |
setName(String name)
Sets the property name.
|
void |
setOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName)
Sets the overrideGeneratedPropertyName.
|
void |
setPropertyType(SystemPropertyFieldType propertyType)
Sets the property field type.
|
void |
setValue(String value)
Sets the property value.
|
protected Long id
protected String name
protected Boolean overrideGeneratedPropertyName
protected String value
protected String propertyType
protected String friendlyName
protected String friendlyGroup
protected String friendlyTab
public Long getId()
SystemPropertygetId in interface SystemPropertypublic void setId(Long id)
SystemPropertysetId in interface SystemPropertypublic String getName()
SystemPropertygetName in interface SystemPropertypublic void setName(String name)
SystemPropertysetName in interface SystemPropertypublic Boolean getOverrideGeneratedPropertyName()
SystemPropertygetOverrideGeneratedPropertyName in interface SystemPropertypublic void setOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName)
SystemPropertysetOverrideGeneratedPropertyName in interface SystemPropertypublic String getValue()
SystemPropertygetValue in interface SystemPropertypublic void setValue(String value)
SystemPropertysetValue in interface SystemPropertypublic String getFriendlyName()
getFriendlyName in interface SystemPropertypublic void setFriendlyName(String friendlyName)
SystemPropertysetFriendlyName in interface SystemPropertypublic String getFriendlyGroup()
getFriendlyGroup in interface SystemPropertypublic void setFriendlyGroup(String friendlyGroup)
SystemPropertysetFriendlyGroup in interface SystemPropertypublic String getFriendlyTab()
getFriendlyTab in interface SystemPropertypublic void setFriendlyTab(String friendlyTab)
SystemPropertysetFriendlyTab in interface SystemPropertypublic SystemPropertyFieldType getPropertyType()
SystemPropertygetPropertyType in interface SystemPropertypublic void setPropertyType(SystemPropertyFieldType propertyType)
SystemPropertysetPropertyType in interface SystemPropertypublic String getMainEntityName()
getMainEntityName in interface AdminMainEntitypublic <G extends SystemProperty> 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<SystemProperty>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2022. All rights reserved.