Liferay 6.2-ce-ga5

com.liferay.portal.model.impl
Class BaseModelImpl<T>

java.lang.Object
  extended by com.liferay.portal.model.impl.BaseModelImpl<T>
All Implemented Interfaces:
BaseModel<T>, ClassedModel, Serializable, Cloneable, Comparable<T>

public abstract class BaseModelImpl<T>
extends Object
implements BaseModel<T>

The base implementation for all model classes. This class should never need to be used directly.

See Also:
Serialized Form

Constructor Summary
BaseModelImpl()
           
 
Method Summary
abstract  Object clone()
          Creates a shallow clone of this model instance.
 ExpandoBridge getExpandoBridge()
          Returns the expando bridge for this model instance.
protected  Locale getLocale(String languageId)
           
 Map<String,Object> getModelAttributes()
           
 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 resetOriginalValues()
          Reset all original fields to current values.
 void setCachedModel(boolean cachedModel)
          Sets whether this model instance was retrieved from the entity cache.
 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 setNew(boolean n)
          Sets whether this model instance does not yet exist in the database.
 CacheModel<T> toCacheModel()
          Returns a cache model object for this entity used by entity cache.
 T toEscapedModel()
          Returns a copy of this entity as an escaped model instance by wrapping it with an AutoEscapeBeanHandler.
 T toUnescapedModel()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.liferay.portal.model.BaseModel
getPrimaryKeyObj, setPrimaryKeyObj, toXmlString
 
Methods inherited from interface com.liferay.portal.model.ClassedModel
getModelClass, getModelClassName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

BaseModelImpl

public BaseModelImpl()
Method Detail

clone

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

Specified by:
clone in interface BaseModel<T>
Overrides:
clone in class Object
Returns:
the shallow clone of this model instance

getExpandoBridge

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

Specified by:
getExpandoBridge in interface BaseModel<T>
Specified by:
getExpandoBridge in interface ClassedModel
Returns:
the expando bridge for this model instance

getModelAttributes

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

isCachedModel

public boolean isCachedModel()
Description copied from interface: BaseModel
Returns true if this model instance was retrieved from the entity cache.

Specified by:
isCachedModel in interface BaseModel<T>
Returns:
true if this model instance was retrieved from the entity cache; false otherwise
See Also:
BaseModel.setCachedModel(boolean)

isEscapedModel

public boolean isEscapedModel()
Description copied from interface: BaseModel
Returns true if this model instance is escaped.

Specified by:
isEscapedModel in interface BaseModel<T>
Returns:
true if this model instance is escaped; false otherwise

isNew

public boolean isNew()
Description copied from interface: BaseModel
Returns true if this model instance does not yet exist in the database.

Specified by:
isNew in interface BaseModel<T>
Returns:
true if this model instance does not yet exist in the database; false otherwise

resetOriginalValues

public void resetOriginalValues()
Description copied from interface: BaseModel
Reset all original fields to current values.

Specified by:
resetOriginalValues in interface BaseModel<T>

setCachedModel

public void setCachedModel(boolean cachedModel)
Description copied from interface: BaseModel
Sets whether this model instance was retrieved from the entity cache.

Specified by:
setCachedModel in interface BaseModel<T>
Parameters:
cachedModel - whether this model instance was retrieved from the entity cache
See Also:
EntityCache

setExpandoBridgeAttributes

public void setExpandoBridgeAttributes(BaseModel<?> baseModel)
Specified by:
setExpandoBridgeAttributes in interface BaseModel<T>

setExpandoBridgeAttributes

public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
Specified by:
setExpandoBridgeAttributes in interface BaseModel<T>

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<T>
Parameters:
serviceContext - the service context to be applied
See Also:
ServiceContext.getExpandoBridgeAttributes( )

setModelAttributes

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

setNew

public void setNew(boolean n)
Description copied from interface: BaseModel
Sets whether this model instance does not yet exist in the database.

Specified by:
setNew in interface BaseModel<T>
Parameters:
n - whether this model instance does not yet exist in the database

toCacheModel

public CacheModel<T> toCacheModel()
Description copied from interface: BaseModel
Returns a cache model object for this entity used by entity cache.

Specified by:
toCacheModel in interface BaseModel<T>
Returns:
the cache model object

toEscapedModel

public T toEscapedModel()
Description copied from interface: BaseModel
Returns a copy of this entity as an escaped model instance by wrapping it with an AutoEscapeBeanHandler.

Specified by:
toEscapedModel in interface BaseModel<T>
Returns:
the escaped model instance
See Also:
AutoEscapeBeanHandler

toUnescapedModel

public T toUnescapedModel()
Specified by:
toUnescapedModel in interface BaseModel<T>

getLocale

protected Locale getLocale(String languageId)

Liferay 6.2-ce-ga5