@ProviderType public interface BaseModel<T> extends ClassedModel, java.lang.Cloneable, java.lang.Comparable<T>, java.io.Serializable
BaseModelImpl
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a shallow clone of this model instance.
|
ExpandoBridge |
getExpandoBridge()
Returns the expando bridge for this model instance.
|
java.util.Map<java.lang.String,java.lang.Object> |
getModelAttributes() |
java.io.Serializable |
getPrimaryKeyObj()
Returns the primary key of this model instance.
|
boolean |
isCachedModel()
Returns
true if this model instance was retrieved from the
entity cache. |
boolean |
isEntityCacheEnabled()
Returns
true if this model's entity cache is enabled. |
boolean |
isEscapedModel()
Returns
true if this model instance is escaped. |
boolean |
isFinderCacheEnabled()
Returns
true if this model's finder cache is enabled. |
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(java.util.Map<java.lang.String,java.lang.Object> attributes) |
void |
setNew(boolean n)
Sets whether this model instance does not yet exist in the database.
|
void |
setPrimaryKeyObj(java.io.Serializable primaryKeyObj)
Sets the primary key of this model instance.
|
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() |
java.lang.String |
toXmlString()
Returns the XML representation of this model instance.
|
getModelClass, getModelClassName
java.lang.Object clone()
ExpandoBridge getExpandoBridge()
getExpandoBridge
in interface ClassedModel
java.util.Map<java.lang.String,java.lang.Object> getModelAttributes()
java.io.Serializable getPrimaryKeyObj()
getPrimaryKeyObj
in interface ClassedModel
boolean isCachedModel()
true
if this model instance was retrieved from the
entity cache.true
if this model instance was retrieved from the
entity cache; false
otherwisesetCachedModel(boolean)
boolean isEntityCacheEnabled()
true
if this model's entity cache is enabled.true
if this model's entity cache is enabled;
false
otherwiseboolean isEscapedModel()
true
if this model instance is escaped.true
if this model instance is escaped;
false
otherwiseboolean isFinderCacheEnabled()
true
if this model's finder cache is enabled.true
if this model's finder cache is enabled;
false
otherwiseboolean isNew()
true
if this model instance does not yet exist in
the database.true
if this model instance does not yet exist in
the database; false
otherwisevoid resetOriginalValues()
void setCachedModel(boolean cachedModel)
cachedModel
- whether this model instance was retrieved from the
entity cacheEntityCache
void setExpandoBridgeAttributes(BaseModel<?> baseModel)
void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
void setExpandoBridgeAttributes(ServiceContext serviceContext)
serviceContext
- the service context to be appliedServiceContext.getExpandoBridgeAttributes()
void setModelAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
void setNew(boolean n)
n
- whether this model instance does not yet exist in the databasevoid setPrimaryKeyObj(java.io.Serializable primaryKeyObj)
setPrimaryKeyObj
in interface ClassedModel
primaryKeyObj
- the primary key of this model instanceCacheModel<T> toCacheModel()
T toEscapedModel()
AutoEscapeBeanHandler
.AutoEscapeBeanHandler
T toUnescapedModel()
java.lang.String toXmlString()