|
Liferay 6.1.2-ce-ga3 | |||||||||
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)
|
boolean |
equals(Object obj)
|
long |
getCodeId()
Returns the code ID of this resource. |
long |
getCompanyId()
|
ExpandoBridge |
getExpandoBridge()
Returns the expando bridge for this model instance. |
Map<String,Object> |
getModelAttributes()
|
Class<?> |
getModelClass()
|
String |
getModelClassName()
|
String |
getName()
|
long |
getPrimaryKey()
Returns the primary key of this resource. |
Serializable |
getPrimaryKeyObj()
Returns the primary key of this model instance. |
String |
getPrimKey()
Returns the prim key of this resource. |
long |
getResourceId()
Returns the resource ID of this resource. |
int |
getScope()
|
Resource |
getWrappedModel()
|
Resource |
getWrappedResource()
Deprecated. Renamed to getWrappedModel() |
int |
hashCode()
|
boolean |
isCachedModel()
Returns true if this model instance was retrieved from the
entity cache. |
boolean |
isEscapedModel()
Returns true if this model instance is escaped. |
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 |
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 |
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 |
setName(String name)
|
void |
setNew(boolean n)
Sets whether this model instance does not yet exist in the database. |
void |
setPrimaryKey(long primaryKey)
Sets the primary key of this resource. |
void |
setPrimaryKeyObj(Serializable primaryKeyObj)
Sets the primary key of this model instance. |
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)
|
CacheModel<Resource> |
toCacheModel()
Returns a cache model object for this entity used by entity cache. |
Resource |
toEscapedModel()
Returns a copy of this entity as an escaped model instance by wrapping it with an AutoEscapeBeanHandler . |
String |
toString()
|
Resource |
toUnescapedModel()
|
String |
toXmlString()
Returns the XML representation of this model instance. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceWrapper(Resource resource)
Method Detail |
---|
public Class<?> getModelClass()
getModelClass
in interface ClassedModel
public String getModelClassName()
getModelClassName
in interface ClassedModel
public Map<String,Object> getModelAttributes()
getModelAttributes
in interface BaseModel<Resource>
public void setModelAttributes(Map<String,Object> attributes)
setModelAttributes
in interface BaseModel<Resource>
public long getPrimaryKey()
getPrimaryKey
in interface ResourceModel
public void setPrimaryKey(long primaryKey)
setPrimaryKey
in interface ResourceModel
primaryKey
- the primary key of this resourcepublic long getResourceId()
getResourceId
in interface ResourceModel
public void setResourceId(long resourceId)
setResourceId
in interface ResourceModel
resourceId
- the resource ID of this resourcepublic long getCodeId()
getCodeId
in interface ResourceModel
public void setCodeId(long codeId)
setCodeId
in interface ResourceModel
codeId
- the code ID of this resourcepublic String getPrimKey()
getPrimKey
in interface ResourceModel
public void setPrimKey(String primKey)
setPrimKey
in interface ResourceModel
primKey
- the prim key of this resourcepublic boolean isNew()
BaseModel
true
if this model instance does not yet exist in
the database.
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
true
if this model instance was retrieved from the
entity cache.
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
true
if this model instance is escaped.
isEscapedModel
in interface BaseModel<Resource>
isEscapedModel
in interface ResourceModel
true
if this model instance is escaped;
false
otherwisepublic Serializable getPrimaryKeyObj()
BaseModel
getPrimaryKeyObj
in interface BaseModel<Resource>
getPrimaryKeyObj
in interface ClassedModel
getPrimaryKeyObj
in interface ResourceModel
public void setPrimaryKeyObj(Serializable primaryKeyObj)
BaseModel
setPrimaryKeyObj
in interface BaseModel<Resource>
setPrimaryKeyObj
in interface ClassedModel
setPrimaryKeyObj
in interface ResourceModel
primaryKeyObj
- the primary key of this model instancepublic ExpandoBridge getExpandoBridge()
BaseModel
getExpandoBridge
in interface BaseModel<Resource>
getExpandoBridge
in interface ClassedModel
getExpandoBridge
in interface ResourceModel
public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModel
setExpandoBridgeAttributes
in interface BaseModel<Resource>
setExpandoBridgeAttributes
in interface ResourceModel
serviceContext
- the service contextServiceContext.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 CacheModel<Resource> toCacheModel()
BaseModel
toCacheModel
in interface BaseModel<Resource>
toCacheModel
in interface ResourceModel
public Resource toEscapedModel()
BaseModel
AutoEscapeBeanHandler
.
toEscapedModel
in interface BaseModel<Resource>
toEscapedModel
in interface ResourceModel
AutoEscapeBeanHandler
public Resource toUnescapedModel()
toUnescapedModel
in interface BaseModel<Resource>
toUnescapedModel
in interface ResourceModel
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 void persist() throws SystemException
PersistedModel
persist
in interface PersistedModel
SystemException
- if a system exception occurredpublic 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 boolean equals(Object obj)
equals
in class Object
public Resource getWrappedResource()
getWrappedModel()
public Resource getWrappedModel()
getWrappedModel
in interface ModelWrapper<Resource>
public void resetOriginalValues()
BaseModel
resetOriginalValues
in interface BaseModel<Resource>
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |