|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.mff.procasor.core.helper.EntityHelper
Helper class for Entity.
Method Summary | |
static void |
addChidren(Entity entity,
Entity child)
Add children entity to EntityList and sets parent of that entity to its new parent. |
static Entity |
createEntity(java.lang.String name,
java.lang.String description)
Creates new entity. |
static boolean |
isAcronymCorrect(Entity entity,
java.lang.String name,
Project project)
Check if the acronym of entity is correct.(if is unique and contains possible chars) |
static boolean |
isNameCorrect(Entity entity,
java.lang.String name,
Project project)
Check if the name of entity is correct. |
static void |
remove(Entity entity,
Project project)
Remove entity from project. |
static void |
save(Entity entity,
Project project)
Generate new id for entity and add entity to the project. |
static void |
setParent(Entity entity,
Entity parent)
Set parent and check all children if parent isn't among children (in this case parent is removed from children). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Entity createEntity(java.lang.String name, java.lang.String description)
name
- name of the entitydescription
- description of the entity
public static void save(Entity entity, Project project)
entity
- entity without idproject
- project entity is setted topublic static void remove(Entity entity, Project project)
entity
- entity to be removedproject
- project entity is removed frompublic static void addChidren(Entity entity, Entity child)
entity
- entity children is added tochild
- entity that is childrenpublic static void setParent(Entity entity, Entity parent)
entity
- entity parent is setted toparent
- entity that is a parent for previous entitypublic static boolean isNameCorrect(Entity entity, java.lang.String name, Project project)
entity
- entity which name is checkedproject
- project with other entities
public static boolean isAcronymCorrect(Entity entity, java.lang.String name, Project project)
entity
- entity which acronym is checkedproject
- project with other entities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |