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 Objectclone()Creates a shallow clone of this model instance.Returns the expando bridge for this model instance.protected LocalebooleanReturnstrueif this model instance was retrieved from the entity cache.booleanReturnstrueif this model instance is escaped.booleanisNew()Returnstrueif this model instance does not yet exist in the database.voidReset all original fields to current values.voidsetCachedModel(boolean cachedModel) Sets whether this model instance was retrieved from the entity cache.voidsetExpandoBridgeAttributes(ExpandoBridge expandoBridge) voidsetExpandoBridgeAttributes(BaseModel<?> baseModel) voidsetExpandoBridgeAttributes(ServiceContext serviceContext) Sets the expando bridge attributes for this model instance to the attributes stored in the service context.voidsetModelAttributes(Map<String, Object> attributes) voidsetNew(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, waitMethods inherited from interface com.liferay.portal.kernel.model.BaseModel
cloneWithOriginalValues, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getPrimaryKeyObj, isEntityCacheEnabled, isFinderCacheEnabled, setPrimaryKeyObjMethods inherited from interface com.liferay.portal.kernel.model.ClassedModel
getModelClass, getModelClassNameMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
BaseModelImpl
public BaseModelImpl()
-
-
Method Details
-
clone
Description copied from interface:BaseModelCreates a shallow clone of this model instance. -
getExpandoBridge
Description copied from interface:BaseModelReturns the expando bridge for this model instance.- Specified by:
getExpandoBridgein interfaceBaseModel<T>- Specified by:
getExpandoBridgein interfaceClassedModel- Returns:
- the expando bridge for this model instance
-
getModelAttributes
- Specified by:
getModelAttributesin interfaceBaseModel<T>
-
isCachedModel
public boolean isCachedModel()Description copied from interface:BaseModelReturnstrueif this model instance was retrieved from the entity cache.- Specified by:
isCachedModelin interfaceBaseModel<T>- Returns:
trueif this model instance was retrieved from the entity cache;falseotherwise- See Also:
-
isEscapedModel
public boolean isEscapedModel()Description copied from interface:BaseModelReturnstrueif this model instance is escaped.- Specified by:
isEscapedModelin interfaceBaseModel<T>- Returns:
trueif this model instance is escaped;falseotherwise
-
isNew
public boolean isNew()Description copied from interface:BaseModelReturnstrueif this model instance does not yet exist in the database. -
resetOriginalValues
public void resetOriginalValues()Description copied from interface:BaseModelReset all original fields to current values.- Specified by:
resetOriginalValuesin interfaceBaseModel<T>
-
setCachedModel
public void setCachedModel(boolean cachedModel) Description copied from interface:BaseModelSets whether this model instance was retrieved from the entity cache.- Specified by:
setCachedModelin interfaceBaseModel<T>- Parameters:
cachedModel- whether this model instance was retrieved from the entity cache- See Also:
-
setExpandoBridgeAttributes
- Specified by:
setExpandoBridgeAttributesin interfaceBaseModel<T>
-
setExpandoBridgeAttributes
- Specified by:
setExpandoBridgeAttributesin interfaceBaseModel<T>
-
setExpandoBridgeAttributes
Description copied from interface:BaseModelSets the expando bridge attributes for this model instance to the attributes stored in the service context.- Specified by:
setExpandoBridgeAttributesin interfaceBaseModel<T>- Parameters:
serviceContext- the service context to be applied- See Also:
-
setModelAttributes
- Specified by:
setModelAttributesin interfaceBaseModel<T>
-
setNew
public void setNew(boolean n) Description copied from interface:BaseModelSets whether this model instance does not yet exist in the database. -
toCacheModel
Description copied from interface:BaseModelReturns a cache model object for this entity used by entity cache.- Specified by:
toCacheModelin interfaceBaseModel<T>- Returns:
- the cache model object
-
toEscapedModel
Description copied from interface:BaseModelReturns a copy of this entity as an escaped model instance by wrapping it with anAutoEscapeBeanHandler.- Specified by:
toEscapedModelin interfaceBaseModel<T>- Returns:
- the escaped model instance
- See Also:
-
toUnescapedModel
- Specified by:
toUnescapedModelin interfaceBaseModel<T>
-
getLocale
-