Class PluginSettingWrapper

Object
com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<PluginSetting>
com.liferay.portal.kernel.model.PluginSettingWrapper
All Implemented Interfaces:
BaseModel<PluginSetting>, ClassedModel, ModelWrapper<PluginSetting>, MVCCModel, PersistedModel, PluginSetting, PluginSettingModel, ShardedModel, Serializable, Cloneable, Comparable<PluginSetting>

public class PluginSettingWrapper extends BaseModelWrapper<PluginSetting> implements ModelWrapper<PluginSetting>, PluginSetting

This class is a wrapper for PluginSetting.

Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Constructor Details

    • PluginSettingWrapper

      public PluginSettingWrapper(PluginSetting pluginSetting)
  • Method Details

    • getModelAttributes

      public Map<String,Object> getModelAttributes()
      Specified by:
      getModelAttributes in interface BaseModel<PluginSetting>
    • setModelAttributes

      public void setModelAttributes(Map<String,Object> attributes)
      Specified by:
      setModelAttributes in interface BaseModel<PluginSetting>
    • addRole

      public void addRole(String role)
      Adds a role to the list of roles.
      Specified by:
      addRole in interface PluginSetting
    • cloneWithOriginalValues

      public PluginSetting cloneWithOriginalValues()
      Specified by:
      cloneWithOriginalValues in interface BaseModel<PluginSetting>
      Specified by:
      cloneWithOriginalValues in interface PluginSettingModel
    • getActive

      public boolean getActive()
      Returns the active of this plugin setting.
      Specified by:
      getActive in interface PluginSettingModel
      Returns:
      the active of this plugin setting
    • getCompanyId

      public long getCompanyId()
      Returns the company ID of this plugin setting.
      Specified by:
      getCompanyId in interface PluginSettingModel
      Specified by:
      getCompanyId in interface ShardedModel
      Returns:
      the company ID of this plugin setting
    • getMvccVersion

      public long getMvccVersion()
      Returns the mvcc version of this plugin setting.
      Specified by:
      getMvccVersion in interface MVCCModel
      Specified by:
      getMvccVersion in interface PluginSettingModel
      Returns:
      the mvcc version of this plugin setting
    • getPluginId

      public String getPluginId()
      Returns the plugin ID of this plugin setting.
      Specified by:
      getPluginId in interface PluginSettingModel
      Returns:
      the plugin ID of this plugin setting
    • getPluginSettingId

      public long getPluginSettingId()
      Returns the plugin setting ID of this plugin setting.
      Specified by:
      getPluginSettingId in interface PluginSettingModel
      Returns:
      the plugin setting ID of this plugin setting
    • getPluginType

      public String getPluginType()
      Returns the plugin type of this plugin setting.
      Specified by:
      getPluginType in interface PluginSettingModel
      Returns:
      the plugin type of this plugin setting
    • getPrimaryKey

      public long getPrimaryKey()
      Returns the primary key of this plugin setting.
      Specified by:
      getPrimaryKey in interface PluginSettingModel
      Returns:
      the primary key of this plugin setting
    • getRoles

      public String getRoles()
      Returns the roles of this plugin setting.
      Specified by:
      getRoles in interface PluginSettingModel
      Returns:
      the roles of this plugin setting
    • getRolesArray

      public String[] getRolesArray()
      Returns an array of required roles of the plugin.
      Specified by:
      getRolesArray in interface PluginSetting
      Returns:
      an array of required roles of the plugin
    • hasPermission

      public boolean hasPermission(long userId)
      Returns true if the user has permission to use this plugin
      Specified by:
      hasPermission in interface PluginSetting
      Parameters:
      userId - the primary key of the user
      Returns:
      true if the user has permission to use this plugin
    • hasPermission

      public boolean hasPermission(long userId, long groupId)
      Returns true if the user has permission to use this plugin
      Specified by:
      hasPermission in interface PluginSetting
      Parameters:
      userId - the primary key of the user
      groupId - the primary key of the group
      Returns:
      true if the user has permission to use this plugin
    • hasRoleWithName

      public boolean hasRoleWithName(String roleName)
      Returns true if the plugin has a role with the specified name.
      Specified by:
      hasRoleWithName in interface PluginSetting
      Parameters:
      roleName - the role name
      Returns:
      true if the plugin has a role with the specified name
    • isActive

      public boolean isActive()
      Returns true if this plugin setting is active.
      Specified by:
      isActive in interface PluginSettingModel
      Returns:
      true if this plugin setting is active; false otherwise
    • persist

      public void persist()
      Description copied from interface: PersistedModel
      Updates this model instance in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
      Specified by:
      persist in interface PersistedModel
    • setActive

      public void setActive(boolean active)
      Sets whether this plugin setting is active.
      Specified by:
      setActive in interface PluginSettingModel
      Parameters:
      active - the active of this plugin setting
    • setCompanyId

      public void setCompanyId(long companyId)
      Sets the company ID of this plugin setting.
      Specified by:
      setCompanyId in interface PluginSettingModel
      Specified by:
      setCompanyId in interface ShardedModel
      Parameters:
      companyId - the company ID of this plugin setting
    • setMvccVersion

      public void setMvccVersion(long mvccVersion)
      Sets the mvcc version of this plugin setting.
      Specified by:
      setMvccVersion in interface MVCCModel
      Specified by:
      setMvccVersion in interface PluginSettingModel
      Parameters:
      mvccVersion - the mvcc version of this plugin setting
    • setPluginId

      public void setPluginId(String pluginId)
      Sets the plugin ID of this plugin setting.
      Specified by:
      setPluginId in interface PluginSettingModel
      Parameters:
      pluginId - the plugin ID of this plugin setting
    • setPluginSettingId

      public void setPluginSettingId(long pluginSettingId)
      Sets the plugin setting ID of this plugin setting.
      Specified by:
      setPluginSettingId in interface PluginSettingModel
      Parameters:
      pluginSettingId - the plugin setting ID of this plugin setting
    • setPluginType

      public void setPluginType(String pluginType)
      Sets the plugin type of this plugin setting.
      Specified by:
      setPluginType in interface PluginSettingModel
      Parameters:
      pluginType - the plugin type of this plugin setting
    • setPrimaryKey

      public void setPrimaryKey(long primaryKey)
      Sets the primary key of this plugin setting.
      Specified by:
      setPrimaryKey in interface PluginSettingModel
      Parameters:
      primaryKey - the primary key of this plugin setting
    • setRoles

      public void setRoles(String roles)
      Sets the roles of this plugin setting.
      Specified by:
      setRoles in interface PluginSettingModel
      Parameters:
      roles - the roles of this plugin setting
    • setRolesArray

      public void setRolesArray(String[] rolesArray)
      Sets an array of required roles of the plugin.
      Specified by:
      setRolesArray in interface PluginSetting
    • toXmlString

      public String toXmlString()
      Specified by:
      toXmlString in interface PluginSettingModel
    • wrap

      protected PluginSettingWrapper wrap(PluginSetting pluginSetting)
      Specified by:
      wrap in class BaseModelWrapper<PluginSetting>