@ProviderType public class PluginSettingWrapper extends Object implements PluginSetting, ModelWrapper<PluginSetting>
This class is a wrapper for PluginSetting
.
PluginSetting
,
Serialized FormPLUGIN_SETTING_ID_ACCESSOR
Constructor and Description |
---|
PluginSettingWrapper(PluginSetting pluginSetting) |
Modifier and Type | Method and Description |
---|---|
void |
addRole(String role)
Adds a role to the list of roles.
|
Object |
clone()
Creates a shallow clone of this model instance.
|
int |
compareTo(PluginSetting pluginSetting) |
boolean |
equals(Object obj) |
boolean |
getActive()
Returns the active of this plugin setting.
|
long |
getCompanyId()
Returns the company ID of this plugin setting.
|
ExpandoBridge |
getExpandoBridge()
Returns the expando bridge for this model instance.
|
Map<String,Object> |
getModelAttributes() |
Class<?> |
getModelClass() |
String |
getModelClassName() |
long |
getMvccVersion()
Returns the mvcc version of this plugin setting.
|
String |
getPluginId()
Returns the plugin ID of this plugin setting.
|
long |
getPluginSettingId()
Returns the plugin setting ID of this plugin setting.
|
String |
getPluginType()
Returns the plugin type of this plugin setting.
|
long |
getPrimaryKey()
Returns the primary key of this plugin setting.
|
Serializable |
getPrimaryKeyObj()
Returns the primary key of this model instance.
|
String |
getRoles()
Returns the roles of this plugin setting.
|
String[] |
getRolesArray()
Returns an array of required roles of the plugin.
|
PluginSetting |
getWrappedModel() |
int |
hashCode() |
boolean |
hasPermission(long userId)
Returns
true if the user has permission to use this plugin |
boolean |
hasRoleWithName(String roleName)
Returns
true if the plugin has a role with the specified
name. |
boolean |
isActive()
Returns
true if this plugin setting is active. |
boolean |
isCachedModel()
Returns
true if this model instance was retrieved from the
entity cache. |
boolean |
isEntityCacheEnabled()
Returns
true if this model's entity cache is enabled. |
boolean |
isEscapedModel()
Returns
true if this model instance is escaped. |
boolean |
isFinderCacheEnabled()
Returns
true if this model's finder cache is enabled. |
boolean |
isNew()
Returns
true if this model instance does not yet exist in
the database. |
void |
persist()
Updates this model instance in the database or adds it if it does not yet
exist.
|
void |
resetOriginalValues()
Reset all original fields to current values.
|
void |
setActive(boolean active)
Sets whether this plugin setting is active.
|
void |
setCachedModel(boolean cachedModel)
Sets whether this model instance was retrieved from the entity cache.
|
void |
setCompanyId(long companyId)
Sets the company ID of this plugin setting.
|
void |
setExpandoBridgeAttributes(BaseModel<?> baseModel) |
void |
setExpandoBridgeAttributes(ExpandoBridge expandoBridge) |
void |
setExpandoBridgeAttributes(ServiceContext serviceContext)
Sets the expando bridge attributes for this model instance to the
attributes stored in the service context.
|
void |
setModelAttributes(Map<String,Object> attributes) |
void |
setMvccVersion(long mvccVersion)
Sets the mvcc version of this plugin setting.
|
void |
setNew(boolean n)
Sets whether this model instance does not yet exist in the database.
|
void |
setPluginId(String pluginId)
Sets the plugin ID of this plugin setting.
|
void |
setPluginSettingId(long pluginSettingId)
Sets the plugin setting ID of this plugin setting.
|
void |
setPluginType(String pluginType)
Sets the plugin type of this plugin setting.
|
void |
setPrimaryKey(long primaryKey)
Sets the primary key of this plugin setting.
|
void |
setPrimaryKeyObj(Serializable primaryKeyObj)
Sets the primary key of this model instance.
|
void |
setRoles(String roles)
Sets the roles of this plugin setting.
|
void |
setRolesArray(String[] rolesArray)
Sets an array of required roles of the plugin.
|
CacheModel<PluginSetting> |
toCacheModel()
Returns a cache model object for this entity used by entity cache.
|
PluginSetting |
toEscapedModel()
Returns a copy of this entity as an escaped model instance by wrapping it
with an
AutoEscapeBeanHandler . |
String |
toString() |
PluginSetting |
toUnescapedModel() |
String |
toXmlString()
Returns the XML representation of this model instance.
|
public PluginSettingWrapper(PluginSetting pluginSetting)
public Class<?> getModelClass()
getModelClass
in interface ClassedModel
public String getModelClassName()
getModelClassName
in interface ClassedModel
public Map<String,Object> getModelAttributes()
getModelAttributes
in interface BaseModel<PluginSetting>
public void setModelAttributes(Map<String,Object> attributes)
setModelAttributes
in interface BaseModel<PluginSetting>
public void addRole(String role)
addRole
in interface PluginSetting
public Object clone()
BaseModel
clone
in interface BaseModel<PluginSetting>
clone
in interface PluginSettingModel
clone
in class Object
public int compareTo(PluginSetting pluginSetting)
compareTo
in interface PluginSettingModel
compareTo
in interface Comparable<PluginSetting>
public boolean getActive()
getActive
in interface PluginSettingModel
public long getCompanyId()
getCompanyId
in interface PluginSettingModel
getCompanyId
in interface ShardedModel
public ExpandoBridge getExpandoBridge()
BaseModel
getExpandoBridge
in interface BaseModel<PluginSetting>
getExpandoBridge
in interface ClassedModel
getExpandoBridge
in interface PluginSettingModel
public long getMvccVersion()
getMvccVersion
in interface MVCCModel
getMvccVersion
in interface PluginSettingModel
public String getPluginId()
getPluginId
in interface PluginSettingModel
public long getPluginSettingId()
getPluginSettingId
in interface PluginSettingModel
public String getPluginType()
getPluginType
in interface PluginSettingModel
public long getPrimaryKey()
getPrimaryKey
in interface PluginSettingModel
public Serializable getPrimaryKeyObj()
BaseModel
getPrimaryKeyObj
in interface BaseModel<PluginSetting>
getPrimaryKeyObj
in interface ClassedModel
getPrimaryKeyObj
in interface PluginSettingModel
public String getRoles()
getRoles
in interface PluginSettingModel
public String[] getRolesArray()
getRolesArray
in interface PluginSetting
public int hashCode()
hashCode
in interface PluginSettingModel
hashCode
in class Object
public boolean hasPermission(long userId)
true
if the user has permission to use this pluginhasPermission
in interface PluginSetting
userId
- the primary key of the usertrue
if the user has permission to use this pluginpublic boolean hasRoleWithName(String roleName)
true
if the plugin has a role with the specified
name.hasRoleWithName
in interface PluginSetting
roleName
- the role nametrue
if the plugin has a role with the specified
namepublic boolean isActive()
true
if this plugin setting is active.isActive
in interface PluginSettingModel
true
if this plugin setting is active; false
otherwisepublic boolean isCachedModel()
BaseModel
true
if this model instance was retrieved from the
entity cache.isCachedModel
in interface BaseModel<PluginSetting>
isCachedModel
in interface PluginSettingModel
true
if this model instance was retrieved from the
entity cache; false
otherwiseBaseModel.setCachedModel(boolean)
public boolean isEscapedModel()
BaseModel
true
if this model instance is escaped.isEscapedModel
in interface BaseModel<PluginSetting>
isEscapedModel
in interface PluginSettingModel
true
if this model instance is escaped;
false
otherwisepublic boolean isNew()
BaseModel
true
if this model instance does not yet exist in
the database.isNew
in interface BaseModel<PluginSetting>
isNew
in interface PluginSettingModel
true
if this model instance does not yet exist in
the database; false
otherwisepublic void persist()
PersistedModel
persist
in interface PersistedModel
public void setActive(boolean active)
setActive
in interface PluginSettingModel
active
- the active of this plugin settingpublic void setCachedModel(boolean cachedModel)
BaseModel
setCachedModel
in interface BaseModel<PluginSetting>
setCachedModel
in interface PluginSettingModel
cachedModel
- whether this model instance was retrieved from the
entity cacheEntityCache
public void setCompanyId(long companyId)
setCompanyId
in interface PluginSettingModel
setCompanyId
in interface ShardedModel
companyId
- the company ID of this plugin settingpublic void setExpandoBridgeAttributes(BaseModel<?> baseModel)
setExpandoBridgeAttributes
in interface BaseModel<PluginSetting>
setExpandoBridgeAttributes
in interface PluginSettingModel
public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
setExpandoBridgeAttributes
in interface BaseModel<PluginSetting>
setExpandoBridgeAttributes
in interface PluginSettingModel
public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModel
setExpandoBridgeAttributes
in interface BaseModel<PluginSetting>
setExpandoBridgeAttributes
in interface PluginSettingModel
serviceContext
- the service context to be appliedServiceContext.getExpandoBridgeAttributes()
public void setMvccVersion(long mvccVersion)
setMvccVersion
in interface MVCCModel
setMvccVersion
in interface PluginSettingModel
mvccVersion
- the mvcc version of this plugin settingpublic void setNew(boolean n)
BaseModel
setNew
in interface BaseModel<PluginSetting>
setNew
in interface PluginSettingModel
n
- whether this model instance does not yet exist in the databasepublic void setPluginId(String pluginId)
setPluginId
in interface PluginSettingModel
pluginId
- the plugin ID of this plugin settingpublic void setPluginSettingId(long pluginSettingId)
setPluginSettingId
in interface PluginSettingModel
pluginSettingId
- the plugin setting ID of this plugin settingpublic void setPluginType(String pluginType)
setPluginType
in interface PluginSettingModel
pluginType
- the plugin type of this plugin settingpublic void setPrimaryKey(long primaryKey)
setPrimaryKey
in interface PluginSettingModel
primaryKey
- the primary key of this plugin settingpublic void setPrimaryKeyObj(Serializable primaryKeyObj)
BaseModel
setPrimaryKeyObj
in interface BaseModel<PluginSetting>
setPrimaryKeyObj
in interface ClassedModel
setPrimaryKeyObj
in interface PluginSettingModel
primaryKeyObj
- the primary key of this model instancepublic void setRoles(String roles)
setRoles
in interface PluginSettingModel
roles
- the roles of this plugin settingpublic void setRolesArray(String[] rolesArray)
setRolesArray
in interface PluginSetting
public CacheModel<PluginSetting> toCacheModel()
BaseModel
toCacheModel
in interface BaseModel<PluginSetting>
toCacheModel
in interface PluginSettingModel
public PluginSetting toEscapedModel()
BaseModel
AutoEscapeBeanHandler
.toEscapedModel
in interface BaseModel<PluginSetting>
toEscapedModel
in interface PluginSettingModel
AutoEscapeBeanHandler
public String toString()
toString
in interface PluginSettingModel
toString
in class Object
public PluginSetting toUnescapedModel()
toUnescapedModel
in interface BaseModel<PluginSetting>
toUnescapedModel
in interface PluginSettingModel
public String toXmlString()
BaseModel
toXmlString
in interface BaseModel<PluginSetting>
toXmlString
in interface PluginSettingModel
public boolean equals(Object obj)
equals
in class Object
public PluginSetting getWrappedModel()
getWrappedModel
in interface ModelWrapper<PluginSetting>
public boolean isEntityCacheEnabled()
BaseModel
true
if this model's entity cache is enabled.isEntityCacheEnabled
in interface BaseModel<PluginSetting>
true
if this model's entity cache is enabled;
false
otherwisepublic boolean isFinderCacheEnabled()
BaseModel
true
if this model's finder cache is enabled.isFinderCacheEnabled
in interface BaseModel<PluginSetting>
true
if this model's finder cache is enabled;
false
otherwisepublic void resetOriginalValues()
BaseModel
resetOriginalValues
in interface BaseModel<PluginSetting>