|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javagen.agile.core.model.AbstractModel
public abstract class AbstractModel
Generic implementation of Model interface. See Model for documentation.
Xml binding annotations are defined to support serialization of subclasses of AbstractModel.
| Field Summary | |
|---|---|
protected List<Model> |
childModels
|
protected Map<String,Object> |
context
|
protected String |
id
|
protected String |
modelType
|
protected String |
name
|
protected Model |
parentModel
|
| Fields inherited from interface org.javagen.agile.core.model.Model |
|---|
DEFAULT_MODEL_TYPE |
| Constructor Summary | |
|---|---|
AbstractModel()
|
|
AbstractModel(String name)
|
|
| Method Summary | |
|---|---|
void |
addChildModel(Model child)
Add child model, making sure the parent is set. |
List<Model> |
allOwnedModels()
This method is used by the visitor patterns to navigate the model tree hierarchy. |
void |
copyTo(Model target)
Copy non-null properties into target model instance. |
boolean |
equals(Object obj)
|
Object |
get(String key)
Convienience method to access the local context of key-value pairs. |
List<Model> |
getChildModels()
|
Map<String,Object> |
getContext()
|
String |
getId()
Ids are used to serialize Model references and allow fast lookups of unique Model instances. |
String |
getModelType()
A modelType is just that, the type of thing being modeled. |
String |
getName()
A name that describes what is being modeled and forms the basis of the generated artifact names. |
Model |
getParentModel()
A parent is usually the owner or source of the child node. |
Model |
lookupChildByName(String name)
|
void |
put(String key,
Object value)
|
void |
setChildModels(List<Model> childModels)
Set child models, making sure the parent is set. |
void |
setContext(Map<String,Object> context)
|
void |
setId(String id)
|
void |
setModelType(String modelType)
|
void |
setName(String name)
|
void |
setParentModel(Model parentModel)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected String id
protected String modelType
protected Map<String,Object> context
protected Model parentModel
protected List<Model> childModels
| Constructor Detail |
|---|
public AbstractModel()
public AbstractModel(String name)
| Method Detail |
|---|
public String getName()
ModellookupChildByName to work effectively.
getName in interface Modelpublic void setName(String name)
setName in interface Modelpublic String getId()
Model
getId in interface Modelpublic void setId(String id)
setId in interface Modelpublic String getModelType()
Model
getModelType in interface Modelpublic void setModelType(String modelType)
setModelType in interface Modelpublic String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic Model getParentModel()
Model
getParentModel in interface Modelpublic void setParentModel(Model parentModel)
setParentModel in interface Modelpublic List<Model> getChildModels()
getChildModels in interface Modelpublic void setChildModels(List<Model> childModels)
setChildModels in interface Modelpublic void addChildModel(Model child)
addChildModel in interface Modelpublic Model lookupChildByName(String name)
lookupChildByName in interface Modelpublic List<Model> allOwnedModels()
ModelgetChildModles.
allOwnedModels in interface Modelpublic Object get(String key)
Model
get in interface Modelkey - a unique string value.
public void put(String key,
Object value)
put in interface Modelpublic Map<String,Object> getContext()
getContext in interface ContextHolderpublic void setContext(Map<String,Object> context)
public void copyTo(Model target)
Model
copyTo in interface Modeltarget - model to set properties on
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||