public class NullSystemProperty extends Object implements SystemProperty
AbstractCacheMissAware and SystemPropertiesDaoImpl)| Constructor and Description |
|---|
NullSystemProperty() |
| 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 |
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 type)
Sets the property field type.
|
void |
setValue(String value)
Sets the property value.
|
public <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 configurationpublic 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 SystemPropertyFieldType getPropertyType()
SystemPropertygetPropertyType in interface SystemPropertypublic void setPropertyType(SystemPropertyFieldType type)
SystemPropertysetPropertyType 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 SystemPropertyCopyright © 2022. All rights reserved.