|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucot.model.object.Entity
public class Entity
This class represents entity in analyze model.
Field Summary | |
---|---|
private java.util.Map<java.lang.String,Attribute> |
attributes
Maps attribute names and attributes. |
private java.util.Set<Entity> |
childEntities
The child entities. |
(package private) boolean |
deleted
Marks if this entity is deleted or not. |
private java.util.Map<java.lang.String,Method> |
methods
Maps method names and methods. |
private java.lang.String |
name
The name of this entity. |
private java.util.Set<Entity> |
parentEntities
The parent entities. |
static long |
serialVersionUID
|
private java.lang.String |
type
The type of the entity. |
Constructor Summary | |
---|---|
Entity(java.lang.String name)
Creates the entity. |
Method Summary | |
---|---|
void |
addAttribute(Attribute attribute)
Adds attribute. |
void |
addAttribute(java.lang.String name,
Attribute attribute)
Adds attribute for this entity |
void |
addChild(Entity entity)
Adds child and adds this entity as a parent of the given entity if nessesary |
void |
addMethod(Method method)
Adds method. |
void |
addMethod(java.lang.String methodName)
Creates and adds method using given name. |
void |
addParent(Entity entity)
Adds parent and adds this entity as a child of the given entity if nessesary |
private void |
checkEntityCollection(java.util.Collection<Entity> col)
|
Attribute |
getAttribute(java.lang.String name)
Gets attribute called name. |
java.util.Set<Attribute> |
getAttributes()
Get all the attributes. |
java.util.Set<Entity> |
getChildren()
Returns the children of this entity. |
Method |
getMethod(java.lang.String methodName)
Return method. |
java.util.Set<java.lang.String> |
getMethodNames()
Returns the names of the methods. |
java.util.Set<Method> |
getMethods()
Get all the methods. |
java.lang.String |
getName()
Returns the name of this entity. |
java.util.Set<Entity> |
getParents()
Returns the parent entities of this entity. |
java.lang.String |
getType()
Return the type of the entity. |
void |
removeAttribute(Attribute toBeRemoved)
Removes given attribute. |
void |
removeAttribute(java.lang.String name)
Removes attribute called name. |
void |
removeChild(Entity entity)
Removes child and removes this entity from the parent list of a given entity if nessesary. |
void |
removeMethod(java.lang.String methodName)
Removes method. |
void |
removeParent(Entity entity)
Removes parent and removes this entity from the child list of a given entity if nessesary. |
protected void |
setName(java.lang.String name)
Sets the name of the entity. |
void |
setType(java.lang.String type)
Sets the tyoe of the entity. |
private void |
updateAttributes()
Removes deleted entities from the attribute list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
private java.util.Map<java.lang.String,Attribute> attributes
private java.util.Map<java.lang.String,Method> methods
private java.util.Set<Entity> childEntities
private java.util.Set<Entity> parentEntities
private java.lang.String name
private java.lang.String type
boolean deleted
Constructor Detail |
---|
public Entity(java.lang.String name)
name
- Method Detail |
---|
protected void setName(java.lang.String name)
name
- private void updateAttributes()
public void addAttribute(java.lang.String name, Attribute attribute)
name
- attribute
- public Attribute getAttribute(java.lang.String name)
name
- public java.util.Set<Attribute> getAttributes()
public void removeAttribute(java.lang.String name)
name
- public void removeAttribute(Attribute toBeRemoved)
toBeRemoved
- public void addAttribute(Attribute attribute)
attribute
- attribute to addpublic java.lang.String getName()
private void checkEntityCollection(java.util.Collection<Entity> col)
public java.util.Set<Entity> getParents()
public java.util.Set<Entity> getChildren()
public void addParent(Entity entity)
entity
- public void addChild(Entity entity)
entity
- public void removeParent(Entity entity)
entity
- public void removeChild(Entity entity)
entity
- public Method getMethod(java.lang.String methodName)
methodName
-
public void addMethod(java.lang.String methodName)
methodName
- name to usepublic void addMethod(Method method)
method
- to addpublic void removeMethod(java.lang.String methodName)
methodName
- public java.util.Set<java.lang.String> getMethodNames()
public java.lang.String getType()
public void setType(java.lang.String type)
type
- The typepublic java.util.Set<Method> getMethods()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |