@ProviderType public class ClassNameWrapper extends Object implements ClassName, ModelWrapper<ClassName>
This class is a wrapper for ClassName
.
ClassName
,
Serialized FormCLASS_NAME_ID_ACCESSOR
Constructor and Description |
---|
ClassNameWrapper(ClassName className) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a shallow clone of this model instance.
|
int |
compareTo(ClassName className) |
boolean |
equals(Object obj) |
String |
getClassName()
Returns the fully qualified class name of this class name.
|
long |
getClassNameId()
Returns the class name ID of this class name.
|
ExpandoBridge |
getExpandoBridge()
Returns the expando bridge for this model instance.
|
Map<String,Object> |
getModelAttributes() |
Class<?> |
getModelClass() |
String |
getModelClassName() |
long |
getMvccVersion()
Returns the mvcc version of this class name.
|
long |
getPrimaryKey()
Returns the primary key of this class name.
|
Serializable |
getPrimaryKeyObj()
Returns the primary key of this model instance.
|
String |
getValue()
Returns the value of this class name.
|
ClassName |
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 |
persist()
Updates this model instance in the database or adds it if it does not yet
exist.
|
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 |
setClassName(String className) |
void |
setClassNameId(long classNameId)
Sets the class name ID of this class name.
|
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 |
setMvccVersion(long mvccVersion)
Sets the mvcc version of this class name.
|
void |
setNew(boolean n)
Sets whether this model instance does not yet exist in the database.
|
void |
setPrimaryKey(long primaryKey)
Sets the primary key of this class name.
|
void |
setPrimaryKeyObj(Serializable primaryKeyObj)
Sets the primary key of this model instance.
|
void |
setValue(String value)
Sets the value of this class name.
|
CacheModel<ClassName> |
toCacheModel()
Returns a cache model object for this entity used by entity cache.
|
ClassName |
toEscapedModel()
Returns a copy of this entity as an escaped model instance by wrapping it
with an
AutoEscapeBeanHandler . |
String |
toString() |
ClassName |
toUnescapedModel() |
String |
toXmlString()
Returns the XML representation of this model instance.
|
public ClassNameWrapper(ClassName className)
public Class<?> getModelClass()
getModelClass
in interface ClassedModel
public String getModelClassName()
getModelClassName
in interface ClassedModel
public Map<String,Object> getModelAttributes()
getModelAttributes
in interface BaseModel<ClassName>
public void setModelAttributes(Map<String,Object> attributes)
setModelAttributes
in interface BaseModel<ClassName>
public Object clone()
BaseModel
clone
in interface BaseModel<ClassName>
clone
in interface ClassNameModel
clone
in class Object
public int compareTo(ClassName className)
compareTo
in interface ClassNameModel
compareTo
in interface Comparable<ClassName>
public String getClassName()
getClassName
in interface ClassNameModel
getClassName
in interface TypedModel
public long getClassNameId()
getClassNameId
in interface ClassNameModel
getClassNameId
in interface TypedModel
public ExpandoBridge getExpandoBridge()
BaseModel
getExpandoBridge
in interface BaseModel<ClassName>
getExpandoBridge
in interface ClassedModel
getExpandoBridge
in interface ClassNameModel
public long getMvccVersion()
getMvccVersion
in interface ClassNameModel
getMvccVersion
in interface MVCCModel
public long getPrimaryKey()
getPrimaryKey
in interface ClassNameModel
public Serializable getPrimaryKeyObj()
BaseModel
getPrimaryKeyObj
in interface BaseModel<ClassName>
getPrimaryKeyObj
in interface ClassedModel
getPrimaryKeyObj
in interface ClassNameModel
public String getValue()
getValue
in interface ClassNameModel
public int hashCode()
hashCode
in interface ClassNameModel
hashCode
in class Object
public boolean isCachedModel()
BaseModel
true
if this model instance was retrieved from the
entity cache.isCachedModel
in interface BaseModel<ClassName>
isCachedModel
in interface ClassNameModel
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<ClassName>
isEscapedModel
in interface ClassNameModel
true
if this model instance is escaped;
false
otherwisepublic boolean isNew()
BaseModel
true
if this model instance does not yet exist in
the database.isNew
in interface BaseModel<ClassName>
isNew
in interface ClassNameModel
true
if this model instance does not yet exist in
the database; false
otherwisepublic void persist()
PersistedModel
persist
in interface PersistedModel
public void setCachedModel(boolean cachedModel)
BaseModel
setCachedModel
in interface BaseModel<ClassName>
setCachedModel
in interface ClassNameModel
cachedModel
- whether this model instance was retrieved from the
entity cacheEntityCache
public void setClassName(String className)
setClassName
in interface ClassNameModel
public void setClassNameId(long classNameId)
setClassNameId
in interface ClassNameModel
setClassNameId
in interface TypedModel
classNameId
- the class name ID of this class namepublic void setExpandoBridgeAttributes(BaseModel<?> baseModel)
setExpandoBridgeAttributes
in interface BaseModel<ClassName>
setExpandoBridgeAttributes
in interface ClassNameModel
public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
setExpandoBridgeAttributes
in interface BaseModel<ClassName>
setExpandoBridgeAttributes
in interface ClassNameModel
public void setExpandoBridgeAttributes(ServiceContext serviceContext)
BaseModel
setExpandoBridgeAttributes
in interface BaseModel<ClassName>
setExpandoBridgeAttributes
in interface ClassNameModel
serviceContext
- the service context to be appliedServiceContext.getExpandoBridgeAttributes()
public void setMvccVersion(long mvccVersion)
setMvccVersion
in interface ClassNameModel
setMvccVersion
in interface MVCCModel
mvccVersion
- the mvcc version of this class namepublic void setNew(boolean n)
BaseModel
setNew
in interface BaseModel<ClassName>
setNew
in interface ClassNameModel
n
- whether this model instance does not yet exist in the databasepublic void setPrimaryKey(long primaryKey)
setPrimaryKey
in interface ClassNameModel
primaryKey
- the primary key of this class namepublic void setPrimaryKeyObj(Serializable primaryKeyObj)
BaseModel
setPrimaryKeyObj
in interface BaseModel<ClassName>
setPrimaryKeyObj
in interface ClassedModel
setPrimaryKeyObj
in interface ClassNameModel
primaryKeyObj
- the primary key of this model instancepublic void setValue(String value)
setValue
in interface ClassNameModel
value
- the value of this class namepublic CacheModel<ClassName> toCacheModel()
BaseModel
toCacheModel
in interface BaseModel<ClassName>
toCacheModel
in interface ClassNameModel
public ClassName toEscapedModel()
BaseModel
AutoEscapeBeanHandler
.toEscapedModel
in interface BaseModel<ClassName>
toEscapedModel
in interface ClassNameModel
AutoEscapeBeanHandler
public String toString()
toString
in interface ClassNameModel
toString
in class Object
public ClassName toUnescapedModel()
toUnescapedModel
in interface BaseModel<ClassName>
toUnescapedModel
in interface ClassNameModel
public String toXmlString()
BaseModel
toXmlString
in interface BaseModel<ClassName>
toXmlString
in interface ClassNameModel
public boolean equals(Object obj)
equals
in class Object
public ClassName getWrappedModel()
getWrappedModel
in interface ModelWrapper<ClassName>
public boolean isEntityCacheEnabled()
BaseModel
true
if this model's entity cache is enabled.isEntityCacheEnabled
in interface BaseModel<ClassName>
true
if this model's entity cache is enabled;
false
otherwisepublic boolean isFinderCacheEnabled()
BaseModel
true
if this model's finder cache is enabled.isFinderCacheEnabled
in interface BaseModel<ClassName>
true
if this model's finder cache is enabled;
false
otherwisepublic void resetOriginalValues()
BaseModel
resetOriginalValues
in interface BaseModel<ClassName>