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()
SystemProperty
getId
in interface SystemProperty
public void setId(Long id)
SystemProperty
setId
in interface SystemProperty
public String getName()
SystemProperty
getName
in interface SystemProperty
public void setName(String name)
SystemProperty
setName
in interface SystemProperty
public Boolean getOverrideGeneratedPropertyName()
SystemProperty
getOverrideGeneratedPropertyName
in interface SystemProperty
public void setOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName)
SystemProperty
setOverrideGeneratedPropertyName
in interface SystemProperty
public String getValue()
SystemProperty
getValue
in interface SystemProperty
public void setValue(String value)
SystemProperty
setValue
in interface SystemProperty
public SystemPropertyFieldType getPropertyType()
SystemProperty
getPropertyType
in interface SystemProperty
public void setPropertyType(SystemPropertyFieldType type)
SystemProperty
setPropertyType
in interface SystemProperty
public String getFriendlyName()
getFriendlyName
in interface SystemProperty
public void setFriendlyName(String friendlyName)
SystemProperty
setFriendlyName
in interface SystemProperty
public String getFriendlyGroup()
getFriendlyGroup
in interface SystemProperty
public void setFriendlyGroup(String friendlyGroup)
SystemProperty
setFriendlyGroup
in interface SystemProperty
public String getFriendlyTab()
getFriendlyTab
in interface SystemProperty
public void setFriendlyTab(String friendlyTab)
SystemProperty
setFriendlyTab
in interface SystemProperty
Copyright © 2022. All rights reserved.