Class BaseModelImpl<T>
Object
com.liferay.portal.kernel.model.impl.BaseModelImpl<T>
- All Implemented Interfaces:
BaseModel<T>
,ClassedModel
,Serializable
,Cloneable
,Comparable<T>
The base implementation for all model classes. This class should never need
to be used directly.
- Author:
- Brian Wing Shun Chan
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Object
clone()
Creates a shallow clone of this model instance.Returns the expando bridge for this model instance.protected Locale
boolean
Returnstrue
if this model instance was retrieved from the entity cache.boolean
Returnstrue
if this model instance is escaped.boolean
isNew()
Returnstrue
if this model instance does not yet exist in the database.void
Reset all original fields to current values.void
setCachedModel
(boolean cachedModel) Sets whether this model instance was retrieved from the entity cache.void
setExpandoBridgeAttributes
(ExpandoBridge expandoBridge) void
setExpandoBridgeAttributes
(BaseModel<?> baseModel) 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.Returns a cache model object for this entity used by entity cache.Returns a copy of this entity as an escaped model instance by wrapping it with anAutoEscapeBeanHandler
.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.model.BaseModel
cloneWithOriginalValues, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getPrimaryKeyObj, isEntityCacheEnabled, isFinderCacheEnabled, setPrimaryKeyObj
Methods inherited from interface com.liferay.portal.kernel.model.ClassedModel
getModelClass, getModelClassName
Methods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
BaseModelImpl
public BaseModelImpl()
-
-
Method Details
-
clone
Description copied from interface:BaseModel
Creates a shallow clone of this model instance. -
getExpandoBridge
Description copied from interface:BaseModel
Returns the expando bridge for this model instance.- Specified by:
getExpandoBridge
in interfaceBaseModel<T>
- Specified by:
getExpandoBridge
in interfaceClassedModel
- Returns:
- the expando bridge for this model instance
-
getModelAttributes
- Specified by:
getModelAttributes
in interfaceBaseModel<T>
-
isCachedModel
public boolean isCachedModel()Description copied from interface:BaseModel
Returnstrue
if this model instance was retrieved from the entity cache.- Specified by:
isCachedModel
in interfaceBaseModel<T>
- Returns:
true
if this model instance was retrieved from the entity cache;false
otherwise- See Also:
-
isEscapedModel
public boolean isEscapedModel()Description copied from interface:BaseModel
Returnstrue
if this model instance is escaped.- Specified by:
isEscapedModel
in interfaceBaseModel<T>
- Returns:
true
if this model instance is escaped;false
otherwise
-
isNew
public boolean isNew()Description copied from interface:BaseModel
Returnstrue
if this model instance does not yet exist in the database. -
resetOriginalValues
public void resetOriginalValues()Description copied from interface:BaseModel
Reset all original fields to current values.- Specified by:
resetOriginalValues
in interfaceBaseModel<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 interfaceBaseModel<T>
- Parameters:
cachedModel
- whether this model instance was retrieved from the entity cache- See Also:
-
setExpandoBridgeAttributes
- Specified by:
setExpandoBridgeAttributes
in interfaceBaseModel<T>
-
setExpandoBridgeAttributes
- Specified by:
setExpandoBridgeAttributes
in interfaceBaseModel<T>
-
setExpandoBridgeAttributes
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 interfaceBaseModel<T>
- Parameters:
serviceContext
- the service context to be applied- See Also:
-
setModelAttributes
- Specified by:
setModelAttributes
in interfaceBaseModel<T>
-
setNew
public void setNew(boolean n) Description copied from interface:BaseModel
Sets whether this model instance does not yet exist in the database. -
toCacheModel
Description copied from interface:BaseModel
Returns a cache model object for this entity used by entity cache.- Specified by:
toCacheModel
in interfaceBaseModel<T>
- Returns:
- the cache model object
-
toEscapedModel
Description copied from interface:BaseModel
Returns a copy of this entity as an escaped model instance by wrapping it with anAutoEscapeBeanHandler
.- Specified by:
toEscapedModel
in interfaceBaseModel<T>
- Returns:
- the escaped model instance
- See Also:
-
toUnescapedModel
- Specified by:
toUnescapedModel
in interfaceBaseModel<T>
-
getLocale
-