@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, wait
getPrimaryKeyObj, isEntityCacheEnabled, isFinderCacheEnabled, setPrimaryKeyObj, toXmlString
getModelClass, getModelClassName
public abstract Object clone()
BaseModel
public ExpandoBridge getExpandoBridge()
BaseModel
getExpandoBridge
in interface BaseModel<T>
getExpandoBridge
in interface ClassedModel
public Map<String,Object> getModelAttributes()
getModelAttributes
in interface BaseModel<T>
public boolean isCachedModel()
BaseModel
true
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()
BaseModel
true
if this model instance is escaped.isEscapedModel
in interface BaseModel<T>
true
if this model instance is escaped;
false
otherwisepublic boolean isNew()
BaseModel
true
if this model instance does not yet exist in
the database.public void resetOriginalValues()
BaseModel
resetOriginalValues
in interface BaseModel<T>
public void setCachedModel(boolean cachedModel)
BaseModel
setCachedModel
in interface BaseModel<T>
cachedModel
- whether this model instance was retrieved from the
entity cacheEntityCache
public void setExpandoBridgeAttributes(BaseModel<?> baseModel)
setExpandoBridgeAttributes
in interface BaseModel<T>
public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
setExpandoBridgeAttributes
in interface BaseModel<T>
public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModel
setExpandoBridgeAttributes
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)
BaseModel
public CacheModel<T> toCacheModel()
BaseModel
toCacheModel
in interface BaseModel<T>
public T toEscapedModel()
BaseModel
AutoEscapeBeanHandler
.toEscapedModel
in interface BaseModel<T>
AutoEscapeBeanHandler
public T toUnescapedModel()
toUnescapedModel
in interface BaseModel<T>
protected Locale getLocale(String languageId)