public abstract class BaseModelWrapper<T extends BaseModel<T>> extends java.lang.Object implements BaseModel<T>, ModelWrapper<T>
| Constructor and Description |
|---|
BaseModelWrapper(T model) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a shallow clone of this model instance.
|
int |
compareTo(T o) |
boolean |
equals(java.lang.Object object) |
ExpandoBridge |
getExpandoBridge()
Returns the expando bridge for this model instance.
|
java.lang.Class<?> |
getModelClass() |
java.lang.String |
getModelClassName() |
java.io.Serializable |
getPrimaryKeyObj()
Returns the primary key of this model instance.
|
T |
getWrappedModel() |
int |
hashCode() |
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 |
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. |
java.lang.String |
toString() |
T |
toUnescapedModel() |
java.lang.String |
toXmlString()
Returns the XML representation of this model instance.
|
protected abstract T |
wrap(T model) |
finalize, getClass, notify, notifyAll, wait, wait, waitgetAttributeGetterFunctions, getAttributeSetterBiConsumers, getModelAttributes, setModelAttributespublic BaseModelWrapper(T model)
public java.lang.Object clone()
BaseModelpublic int compareTo(T o)
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic ExpandoBridge getExpandoBridge()
BaseModelgetExpandoBridge in interface BaseModel<T extends BaseModel<T>>getExpandoBridge in interface ClassedModelpublic java.lang.Class<?> getModelClass()
getModelClass in interface ClassedModelpublic java.lang.String getModelClassName()
getModelClassName in interface ClassedModelpublic java.io.Serializable getPrimaryKeyObj()
BaseModelgetPrimaryKeyObj in interface BaseModel<T extends BaseModel<T>>getPrimaryKeyObj in interface ClassedModelpublic T getWrappedModel()
getWrappedModel in interface ModelWrapper<T extends BaseModel<T>>public int hashCode()
hashCode in class java.lang.Objectpublic boolean isCachedModel()
BaseModeltrue if this model instance was retrieved from the
entity cache.isCachedModel in interface BaseModel<T extends BaseModel<T>>true if this model instance was retrieved from the
entity cache; false otherwiseBaseModel.setCachedModel(boolean)public boolean isEntityCacheEnabled()
BaseModeltrue if this model's entity cache is enabled.isEntityCacheEnabled in interface BaseModel<T extends BaseModel<T>>true if this model's entity cache is enabled;
false otherwisepublic boolean isEscapedModel()
BaseModeltrue if this model instance is escaped.isEscapedModel in interface BaseModel<T extends BaseModel<T>>true if this model instance is escaped;
false otherwisepublic boolean isFinderCacheEnabled()
BaseModeltrue if this model's finder cache is enabled.isFinderCacheEnabled in interface BaseModel<T extends BaseModel<T>>true if this model's finder cache is enabled;
false otherwisepublic boolean isNew()
BaseModeltrue if this model instance does not yet exist in
the database.public void resetOriginalValues()
BaseModelresetOriginalValues in interface BaseModel<T extends BaseModel<T>>public void setCachedModel(boolean cachedModel)
BaseModelsetCachedModel in interface BaseModel<T extends BaseModel<T>>cachedModel - whether this model instance was retrieved from the
entity cacheEntityCachepublic void setExpandoBridgeAttributes(BaseModel<?> baseModel)
setExpandoBridgeAttributes in interface BaseModel<T extends BaseModel<T>>public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
setExpandoBridgeAttributes in interface BaseModel<T extends BaseModel<T>>public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModelsetExpandoBridgeAttributes in interface BaseModel<T extends BaseModel<T>>serviceContext - the service context to be appliedServiceContext.getExpandoBridgeAttributes()public void setNew(boolean n)
BaseModelpublic void setPrimaryKeyObj(java.io.Serializable primaryKeyObj)
BaseModelsetPrimaryKeyObj in interface BaseModel<T extends BaseModel<T>>setPrimaryKeyObj in interface ClassedModelprimaryKeyObj - the primary key of this model instancepublic CacheModel<T> toCacheModel()
BaseModeltoCacheModel in interface BaseModel<T extends BaseModel<T>>public T toEscapedModel()
BaseModelAutoEscapeBeanHandler.toEscapedModel in interface BaseModel<T extends BaseModel<T>>AutoEscapeBeanHandlerpublic java.lang.String toString()
toString in class java.lang.Objectpublic T toUnescapedModel()
toUnescapedModel in interface BaseModel<T extends BaseModel<T>>public java.lang.String toXmlString()
BaseModeltoXmlString in interface BaseModel<T extends BaseModel<T>>