Liferay 6.0.5

com.liferay.portal.model.impl
Class RoleModelImpl

java.lang.Object
  extended by com.liferay.portal.model.impl.BaseModelImpl<Role>
      extended by com.liferay.portal.model.impl.RoleModelImpl
All Implemented Interfaces:
BaseModel<Role>, RoleModel, Serializable, Cloneable, Comparable<Role>
Direct Known Subclasses:
RoleImpl

public class RoleModelImpl
extends BaseModelImpl<Role>
implements RoleModel

The base model implementation for the Role service. Represents a row in the "Role_" database table, with each column mapped to a property of this class.

This implementation and its corresponding interface RoleModel exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in RoleImpl.

Never modify or reference this class directly. All methods that expect a role model instance should use the Role interface instead.

See Also:
RoleImpl, Role, RoleModel, Serialized Form
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Field Summary
static String DATA_SOURCE
           
static boolean ENTITY_CACHE_ENABLED
           
static boolean FINDER_CACHE_ENABLED
           
static boolean FINDER_CACHE_ENABLED_GROUPS_ROLES
           
static boolean FINDER_CACHE_ENABLED_ROLES_PERMISSIONS
           
static boolean FINDER_CACHE_ENABLED_USERS_ROLES
           
static long LOCK_EXPIRATION_TIME
           
static String MAPPING_TABLE_GROUPS_ROLES_NAME
           
static Object[][] MAPPING_TABLE_ROLES_PERMISSIONS_COLUMNS
           
static String MAPPING_TABLE_ROLES_PERMISSIONS_NAME
           
static String MAPPING_TABLE_ROLES_PERMISSIONS_SQL_CREATE
           
static String MAPPING_TABLE_USERS_ROLES_NAME
           
static String ORDER_BY_JPQL
           
static String ORDER_BY_SQL
           
static String SESSION_FACTORY
           
static Object[][] TABLE_COLUMNS
           
static String TABLE_NAME
           
static String TABLE_SQL_CREATE
           
static String TABLE_SQL_DROP
           
static String TX_MANAGER
           
 
Constructor Summary
RoleModelImpl()
           
 
Method Summary
 Object clone()
          Creates a shallow clone of this model instance.
 int compareTo(Role role)
           
 boolean equals(Object obj)
           
 String getClassName()
          Gets the class name of the model instance this role is polymorphically associated with.
 long getClassNameId()
          Gets the class name id of this role.
 long getClassPK()
          Gets the class p k of this role.
 long getCompanyId()
          Gets the company id of this role.
 String getDescription()
          Gets the description of this role.
 ExpandoBridge getExpandoBridge()
          Gets the expando bridge for this model instance.
 String getName()
          Gets the name of this role.
 long getOriginalClassNameId()
           
 long getOriginalClassPK()
           
 long getOriginalCompanyId()
           
 String getOriginalName()
           
 long getPrimaryKey()
          Gets the primary key of this role.
 Serializable getPrimaryKeyObj()
          Gets the primary key of this model instance.
 long getRoleId()
          Gets the role id of this role.
 String getSubtype()
          Gets the subtype of this role.
 String getTitle()
          Gets the title of this role.
 String getTitle(Locale locale)
          Gets the localized title of this role.
 String getTitle(Locale locale, boolean useDefault)
          Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.
 String getTitle(String languageId)
          Gets the localized title of this role.
 String getTitle(String languageId, boolean useDefault)
          Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.
 Map<Locale,String> getTitleMap()
          Gets a map of the locales and localized title of this role.
 int getType()
          Gets the type of this role.
 int hashCode()
           
 void setClassNameId(long classNameId)
          Sets the class name id of this role.
 void setClassPK(long classPK)
          Sets the class p k of this role.
 void setCompanyId(long companyId)
          Sets the company id of this role.
 void setDescription(String description)
          Sets the description of this role.
 void setExpandoBridgeAttributes(ServiceContext serviceContext)
          Sets the expando bridge attributes for this model instance to the attributes stored in the service context.
 void setName(String name)
          Sets the name of this role.
 void setPrimaryKey(long pk)
          Sets the primary key of this role
 void setRoleId(long roleId)
          Sets the role id of this role.
 void setSubtype(String subtype)
          Sets the subtype of this role.
 void setTitle(Locale locale, String title)
          Sets the localized title of this role.
 void setTitle(String title)
          Sets the title of this role.
 void setTitleMap(Map<Locale,String> titleMap)
          Sets the localized titles of this role from the map of locales and localized titles.
 void setType(int type)
          Sets the type of this role.
 Role toEscapedModel()
          Gets a copy of this role as an escaped model instance by wrapping it with an AutoEscapeBeanHandler.
static Role toModel(RoleSoap soapModel)
          Converts the soap model instance into a normal model instance.
static List<Role> toModels(RoleSoap[] soapModels)
          Converts the soap model instances into normal model instances.
 String toString()
           
 String toXmlString()
          Gets the XML representation of this model instance.
 
Methods inherited from class com.liferay.portal.model.impl.BaseModelImpl
isCachedModel, isEscapedModel, isNew, setCachedModel, setEscapedModel, setNew
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.liferay.portal.model.RoleModel
isCachedModel, isEscapedModel, isNew, setCachedModel, setEscapedModel, setNew
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values

TABLE_COLUMNS

public static final Object[][] TABLE_COLUMNS

TABLE_SQL_CREATE

public static final String TABLE_SQL_CREATE
See Also:
Constant Field Values

TABLE_SQL_DROP

public static final String TABLE_SQL_DROP
See Also:
Constant Field Values

ORDER_BY_JPQL

public static final String ORDER_BY_JPQL
See Also:
Constant Field Values

ORDER_BY_SQL

public static final String ORDER_BY_SQL
See Also:
Constant Field Values

DATA_SOURCE

public static final String DATA_SOURCE
See Also:
Constant Field Values

SESSION_FACTORY

public static final String SESSION_FACTORY
See Also:
Constant Field Values

TX_MANAGER

public static final String TX_MANAGER
See Also:
Constant Field Values

ENTITY_CACHE_ENABLED

public static final boolean ENTITY_CACHE_ENABLED

FINDER_CACHE_ENABLED

public static final boolean FINDER_CACHE_ENABLED

MAPPING_TABLE_GROUPS_ROLES_NAME

public static final String MAPPING_TABLE_GROUPS_ROLES_NAME
See Also:
Constant Field Values

FINDER_CACHE_ENABLED_GROUPS_ROLES

public static final boolean FINDER_CACHE_ENABLED_GROUPS_ROLES

MAPPING_TABLE_ROLES_PERMISSIONS_NAME

public static final String MAPPING_TABLE_ROLES_PERMISSIONS_NAME
See Also:
Constant Field Values

MAPPING_TABLE_ROLES_PERMISSIONS_COLUMNS

public static final Object[][] MAPPING_TABLE_ROLES_PERMISSIONS_COLUMNS

MAPPING_TABLE_ROLES_PERMISSIONS_SQL_CREATE

public static final String MAPPING_TABLE_ROLES_PERMISSIONS_SQL_CREATE
See Also:
Constant Field Values

FINDER_CACHE_ENABLED_ROLES_PERMISSIONS

public static final boolean FINDER_CACHE_ENABLED_ROLES_PERMISSIONS

MAPPING_TABLE_USERS_ROLES_NAME

public static final String MAPPING_TABLE_USERS_ROLES_NAME
See Also:
Constant Field Values

FINDER_CACHE_ENABLED_USERS_ROLES

public static final boolean FINDER_CACHE_ENABLED_USERS_ROLES

LOCK_EXPIRATION_TIME

public static final long LOCK_EXPIRATION_TIME
Constructor Detail

RoleModelImpl

public RoleModelImpl()
Method Detail

toModel

public static Role toModel(RoleSoap soapModel)
Converts the soap model instance into a normal model instance.

Parameters:
soapModel - the soap model instance to convert
Returns:
the normal model instance

toModels

public static List<Role> toModels(RoleSoap[] soapModels)
Converts the soap model instances into normal model instances.

Parameters:
soapModels - the soap model instances to convert
Returns:
the normal model instances

getPrimaryKey

public long getPrimaryKey()
Description copied from interface: RoleModel
Gets the primary key of this role.

Specified by:
getPrimaryKey in interface RoleModel
Returns:
the primary key of this role

setPrimaryKey

public void setPrimaryKey(long pk)
Description copied from interface: RoleModel
Sets the primary key of this role

Specified by:
setPrimaryKey in interface RoleModel
Parameters:
pk - the primary key of this role

getPrimaryKeyObj

public Serializable getPrimaryKeyObj()
Description copied from interface: BaseModel
Gets the primary key of this model instance.

Specified by:
getPrimaryKeyObj in interface BaseModel<Role>
Specified by:
getPrimaryKeyObj in interface RoleModel
Returns:
the primary key of this model instance

getRoleId

public long getRoleId()
Description copied from interface: RoleModel
Gets the role id of this role.

Specified by:
getRoleId in interface RoleModel
Returns:
the role id of this role

setRoleId

public void setRoleId(long roleId)
Description copied from interface: RoleModel
Sets the role id of this role.

Specified by:
setRoleId in interface RoleModel
Parameters:
roleId - the role id of this role

getCompanyId

public long getCompanyId()
Description copied from interface: RoleModel
Gets the company id of this role.

Specified by:
getCompanyId in interface RoleModel
Returns:
the company id of this role

setCompanyId

public void setCompanyId(long companyId)
Description copied from interface: RoleModel
Sets the company id of this role.

Specified by:
setCompanyId in interface RoleModel
Parameters:
companyId - the company id of this role

getOriginalCompanyId

public long getOriginalCompanyId()

getClassName

public String getClassName()
Description copied from interface: RoleModel
Gets the class name of the model instance this role is polymorphically associated with.

Specified by:
getClassName in interface RoleModel
Returns:
the class name of the model instance this role is polymorphically associated with

getClassNameId

public long getClassNameId()
Description copied from interface: RoleModel
Gets the class name id of this role.

Specified by:
getClassNameId in interface RoleModel
Returns:
the class name id of this role

setClassNameId

public void setClassNameId(long classNameId)
Description copied from interface: RoleModel
Sets the class name id of this role.

Specified by:
setClassNameId in interface RoleModel
Parameters:
classNameId - the class name id of this role

getOriginalClassNameId

public long getOriginalClassNameId()

getClassPK

public long getClassPK()
Description copied from interface: RoleModel
Gets the class p k of this role.

Specified by:
getClassPK in interface RoleModel
Returns:
the class p k of this role

setClassPK

public void setClassPK(long classPK)
Description copied from interface: RoleModel
Sets the class p k of this role.

Specified by:
setClassPK in interface RoleModel
Parameters:
classPK - the class p k of this role

getOriginalClassPK

public long getOriginalClassPK()

getName

public String getName()
Description copied from interface: RoleModel
Gets the name of this role.

Specified by:
getName in interface RoleModel
Returns:
the name of this role

setName

public void setName(String name)
Description copied from interface: RoleModel
Sets the name of this role.

Specified by:
setName in interface RoleModel
Parameters:
name - the name of this role

getOriginalName

public String getOriginalName()

getTitle

public String getTitle()
Description copied from interface: RoleModel
Gets the title of this role.

Specified by:
getTitle in interface RoleModel
Returns:
the title of this role

getTitle

public String getTitle(Locale locale)
Description copied from interface: RoleModel
Gets the localized title of this role. Uses the default language if no localization exists for the requested language.

Specified by:
getTitle in interface RoleModel
Parameters:
locale - the locale to get the localized title for
Returns:
the localized title of this role

getTitle

public String getTitle(Locale locale,
                       boolean useDefault)
Description copied from interface: RoleModel
Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.

Specified by:
getTitle in interface RoleModel
Parameters:
locale - the local to get the localized title for
useDefault - whether to use the default language if no localization exists for the requested language
Returns:
the localized title of this role. If useDefault is false and no localization exists for the requested language, an empty string will be returned.

getTitle

public String getTitle(String languageId)
Description copied from interface: RoleModel
Gets the localized title of this role. Uses the default language if no localization exists for the requested language.

Specified by:
getTitle in interface RoleModel
Parameters:
languageId - the id of the language to get the localized title for
Returns:
the localized title of this role

getTitle

public String getTitle(String languageId,
                       boolean useDefault)
Description copied from interface: RoleModel
Gets the localized title of this role, optionally using the default language if no localization exists for the requested language.

Specified by:
getTitle in interface RoleModel
Parameters:
languageId - the id of the language to get the localized title for
useDefault - whether to use the default language if no localization exists for the requested language
Returns:
the localized title of this role

getTitleMap

public Map<Locale,String> getTitleMap()
Description copied from interface: RoleModel
Gets a map of the locales and localized title of this role.

Specified by:
getTitleMap in interface RoleModel
Returns:
the locales and localized title

setTitle

public void setTitle(String title)
Description copied from interface: RoleModel
Sets the title of this role.

Specified by:
setTitle in interface RoleModel
Parameters:
title - the title of this role

setTitle

public void setTitle(Locale locale,
                     String title)
Description copied from interface: RoleModel
Sets the localized title of this role.

Specified by:
setTitle in interface RoleModel
Parameters:
locale - the locale to set the localized title for
title - the localized title of this role

setTitleMap

public void setTitleMap(Map<Locale,String> titleMap)
Description copied from interface: RoleModel
Sets the localized titles of this role from the map of locales and localized titles.

Specified by:
setTitleMap in interface RoleModel
Parameters:
titleMap - the locales and localized titles of this role

getDescription

public String getDescription()
Description copied from interface: RoleModel
Gets the description of this role.

Specified by:
getDescription in interface RoleModel
Returns:
the description of this role

setDescription

public void setDescription(String description)
Description copied from interface: RoleModel
Sets the description of this role.

Specified by:
setDescription in interface RoleModel
Parameters:
description - the description of this role

getType

public int getType()
Description copied from interface: RoleModel
Gets the type of this role.

Specified by:
getType in interface RoleModel
Returns:
the type of this role

setType

public void setType(int type)
Description copied from interface: RoleModel
Sets the type of this role.

Specified by:
setType in interface RoleModel
Parameters:
type - the type of this role

getSubtype

public String getSubtype()
Description copied from interface: RoleModel
Gets the subtype of this role.

Specified by:
getSubtype in interface RoleModel
Returns:
the subtype of this role

setSubtype

public void setSubtype(String subtype)
Description copied from interface: RoleModel
Sets the subtype of this role.

Specified by:
setSubtype in interface RoleModel
Parameters:
subtype - the subtype of this role

toEscapedModel

public Role toEscapedModel()
Description copied from interface: RoleModel
Gets a copy of this role as an escaped model instance by wrapping it with an AutoEscapeBeanHandler.

Specified by:
toEscapedModel in interface RoleModel
Returns:
the escaped model instance
See Also:
AutoEscapeBeanHandler

getExpandoBridge

public ExpandoBridge getExpandoBridge()
Description copied from interface: BaseModel
Gets the expando bridge for this model instance.

Specified by:
getExpandoBridge in interface BaseModel<Role>
Specified by:
getExpandoBridge in interface RoleModel
Overrides:
getExpandoBridge in class BaseModelImpl<Role>
Returns:
the expando bridge for this model instance

setExpandoBridgeAttributes

public void setExpandoBridgeAttributes(ServiceContext serviceContext)
Description copied from interface: BaseModel
Sets the expando bridge attributes for this model instance to the attributes stored in the service context.

Specified by:
setExpandoBridgeAttributes in interface BaseModel<Role>
Specified by:
setExpandoBridgeAttributes in interface RoleModel
Overrides:
setExpandoBridgeAttributes in class BaseModelImpl<Role>
Parameters:
serviceContext - the service context to retrieve the expando bridge attributes from
See Also:
ServiceContext.getExpandoBridgeAttributes( )

clone

public Object clone()
Description copied from interface: BaseModel
Creates a shallow clone of this model instance.

Specified by:
clone in interface BaseModel<Role>
Specified by:
clone in interface RoleModel
Specified by:
clone in class BaseModelImpl<Role>
Returns:
the shallow clone of this model instance

compareTo

public int compareTo(Role role)
Specified by:
compareTo in interface RoleModel
Specified by:
compareTo in interface Comparable<Role>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface RoleModel
Overrides:
hashCode in class Object

toString

public String toString()
Specified by:
toString in interface RoleModel
Overrides:
toString in class Object

toXmlString

public String toXmlString()
Description copied from interface: BaseModel
Gets the XML representation of this model instance.

Specified by:
toXmlString in interface BaseModel<Role>
Specified by:
toXmlString in interface RoleModel
Returns:
the XML representation of this model instance

Liferay 6.0.5