@ProviderType public abstract class BaseModelImpl<T> extends Object implements BaseModel<T>
| Constructor and Description |
|---|
BaseModelImpl() |
| Modifier and Type | Method and Description |
|---|---|
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() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloneWithOriginalValues, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getPrimaryKeyObj, isEntityCacheEnabled, isFinderCacheEnabled, setPrimaryKeyObj, toXmlStringgetModelClass, getModelClassNamepublic abstract Object clone()
BaseModelpublic ExpandoBridge getExpandoBridge()
BaseModelgetExpandoBridge in interface BaseModel<T>getExpandoBridge in interface ClassedModelpublic Map<String,Object> getModelAttributes()
getModelAttributes in interface BaseModel<T>public boolean isCachedModel()
BaseModeltrue if this model instance was retrieved from the
entity cache.isCachedModel in interface BaseModel<T>true if this model instance was retrieved from the
entity cache; false otherwiseBaseModel.setCachedModel(boolean)public boolean isEscapedModel()
BaseModeltrue if this model instance is escaped.isEscapedModel in interface BaseModel<T>true if this model instance is escaped;
false otherwisepublic boolean isNew()
BaseModeltrue if this model instance does not yet exist in
the database.public void resetOriginalValues()
BaseModelresetOriginalValues in interface BaseModel<T>public void setCachedModel(boolean cachedModel)
BaseModelsetCachedModel in interface BaseModel<T>cachedModel - whether this model instance was retrieved from the
entity cacheEntityCachepublic void setExpandoBridgeAttributes(BaseModel<?> baseModel)
setExpandoBridgeAttributes in interface BaseModel<T>public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
setExpandoBridgeAttributes in interface BaseModel<T>public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModelsetExpandoBridgeAttributes in interface BaseModel<T>serviceContext - the service context to be appliedServiceContext.getExpandoBridgeAttributes()public void setModelAttributes(Map<String,Object> attributes)
setModelAttributes in interface BaseModel<T>public void setNew(boolean n)
BaseModelpublic CacheModel<T> toCacheModel()
BaseModeltoCacheModel in interface BaseModel<T>public T toEscapedModel()
BaseModelAutoEscapeBeanHandler.toEscapedModel in interface BaseModel<T>AutoEscapeBeanHandlerpublic T toUnescapedModel()
toUnescapedModel in interface BaseModel<T>protected Locale getLocale(String languageId)