|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.model.ResourceWrapper
public class ResourceWrapper
This class is a wrapper for Resource
.
Resource
,
Serialized FormConstructor Summary | |
---|---|
ResourceWrapper(Resource resource)
|
Method Summary | |
---|---|
Object |
clone()
Creates a shallow clone of this model instance. |
int |
compareTo(Resource resource)
|
long |
getCodeId()
Gets the code id of this resource. |
long |
getCompanyId()
|
ExpandoBridge |
getExpandoBridge()
Gets the expando bridge for this model instance. |
String |
getName()
|
long |
getPrimaryKey()
Gets the primary key of this resource. |
Serializable |
getPrimaryKeyObj()
Gets the primary key of this model instance. |
String |
getPrimKey()
Gets the prim key of this resource. |
long |
getResourceId()
Gets the resource id of this resource. |
int |
getScope()
|
Resource |
getWrappedResource()
|
int |
hashCode()
|
boolean |
isCachedModel()
Determines if this model instance was retrieved from the entity cache. |
boolean |
isEscapedModel()
Determines if this model instance is escaped. |
boolean |
isNew()
Determines if this model instance does not yet exist in the database. |
void |
setCachedModel(boolean cachedModel)
Sets whether this model instance was retrieved from the entity cache. |
void |
setCodeId(long codeId)
Sets the code id of this resource. |
void |
setCompanyId(long companyId)
|
void |
setEscapedModel(boolean escapedModel)
Sets whether this model instance is escaped, meaning that all strings returned from getter methods are HTML safe. |
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)
|
void |
setNew(boolean n)
Sets whether this model instance does not yet exist in the database. |
void |
setPrimaryKey(long pk)
Sets the primary key of this resource |
void |
setPrimKey(String primKey)
Sets the prim key of this resource. |
void |
setResourceId(long resourceId)
Sets the resource id of this resource. |
void |
setScope(int scope)
|
Resource |
toEscapedModel()
Gets a copy of this resource as an escaped model instance by wrapping it with an AutoEscapeBeanHandler . |
String |
toString()
|
String |
toXmlString()
Gets the XML representation of this model instance. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceWrapper(Resource resource)
Method Detail |
---|
public long getPrimaryKey()
ResourceModel
getPrimaryKey
in interface ResourceModel
public void setPrimaryKey(long pk)
ResourceModel
setPrimaryKey
in interface ResourceModel
pk
- the primary key of this resourcepublic long getResourceId()
ResourceModel
getResourceId
in interface ResourceModel
public void setResourceId(long resourceId)
ResourceModel
setResourceId
in interface ResourceModel
resourceId
- the resource id of this resourcepublic long getCodeId()
ResourceModel
getCodeId
in interface ResourceModel
public void setCodeId(long codeId)
ResourceModel
setCodeId
in interface ResourceModel
codeId
- the code id of this resourcepublic String getPrimKey()
ResourceModel
getPrimKey
in interface ResourceModel
public void setPrimKey(String primKey)
ResourceModel
setPrimKey
in interface ResourceModel
primKey
- the prim key of this resourcepublic Resource toEscapedModel()
ResourceModel
AutoEscapeBeanHandler
.
toEscapedModel
in interface ResourceModel
AutoEscapeBeanHandler
public boolean isNew()
BaseModel
isNew
in interface BaseModel<Resource>
isNew
in interface ResourceModel
true
if this model instance does not yet exist in
the database; false
otherwisepublic void setNew(boolean n)
BaseModel
setNew
in interface BaseModel<Resource>
setNew
in interface ResourceModel
n
- whether this model instance does not yet exist in the databasepublic boolean isCachedModel()
BaseModel
isCachedModel
in interface BaseModel<Resource>
isCachedModel
in interface ResourceModel
true
if this model instance was retrieved from the
entity cache; false
otherwiseBaseModel.setCachedModel(boolean)
public void setCachedModel(boolean cachedModel)
BaseModel
setCachedModel
in interface BaseModel<Resource>
setCachedModel
in interface ResourceModel
cachedModel
- whether this model instance was retrieved from the
entity cacheEntityCache
public boolean isEscapedModel()
BaseModel
isEscapedModel
in interface BaseModel<Resource>
isEscapedModel
in interface ResourceModel
true
if this model instance is escaped;
false
otherwiseBaseModel.setEscapedModel(boolean)
public void setEscapedModel(boolean escapedModel)
BaseModel
A model instance can be made escaped by wrapping it with an HTML auto
escape handler using its toEscapedModel
method. For example,
UserModel.toEscapedModel()
.
setEscapedModel
in interface BaseModel<Resource>
setEscapedModel
in interface ResourceModel
escapedModel
- whether this model instance is escapedAutoEscapeBeanHandler
public Serializable getPrimaryKeyObj()
BaseModel
getPrimaryKeyObj
in interface BaseModel<Resource>
getPrimaryKeyObj
in interface ResourceModel
public ExpandoBridge getExpandoBridge()
BaseModel
getExpandoBridge
in interface BaseModel<Resource>
getExpandoBridge
in interface ResourceModel
public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModel
setExpandoBridgeAttributes
in interface BaseModel<Resource>
setExpandoBridgeAttributes
in interface ResourceModel
serviceContext
- the service context to retrieve the expando bridge
attributes fromServiceContext.getExpandoBridgeAttributes(
)
public Object clone()
BaseModel
clone
in interface BaseModel<Resource>
clone
in interface ResourceModel
clone
in class Object
public int compareTo(Resource resource)
compareTo
in interface ResourceModel
compareTo
in interface Comparable<Resource>
public int hashCode()
hashCode
in interface ResourceModel
hashCode
in class Object
public String toString()
toString
in interface ResourceModel
toString
in class Object
public String toXmlString()
BaseModel
toXmlString
in interface BaseModel<Resource>
toXmlString
in interface ResourceModel
public long getCompanyId() throws PortalException, SystemException
getCompanyId
in interface Resource
PortalException
SystemException
public String getName() throws PortalException, SystemException
getName
in interface Resource
PortalException
SystemException
public int getScope() throws PortalException, SystemException
getScope
in interface Resource
PortalException
SystemException
public void setCompanyId(long companyId)
setCompanyId
in interface Resource
public void setName(String name)
setName
in interface Resource
public void setScope(int scope)
setScope
in interface Resource
public Resource getWrappedResource()
|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |