org.designwizard.design.factory
Class ElementsFactory

java.lang.Object
  extended by org.designwizard.design.factory.ElementsFactory
All Implemented Interfaces:
AbstractElementsFactory

public class ElementsFactory
extends java.lang.Object
implements AbstractElementsFactory

Factory for Design elements.

Author:
João Brunet - jarthur@dsc.ufcg.edu.br

Method Summary
 Entity createEntity(java.lang.String entityName)
          Creates a new entity with the specified name.
 Relation createRelation(Relation.TypesOfRelation type, Entity caller, Entity called)
          Creates a new Relation.
static ElementsFactory getInstance()
          Returns the unique instance for this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ElementsFactory getInstance()
Returns the unique instance for this factory.

Returns:
ElementsFactory the unique instance for this factory.

createEntity

public Entity createEntity(java.lang.String entityName)
Creates a new entity with the specified name.

Specified by:
createEntity in interface AbstractElementsFactory
Parameters:
entityName - the name of the entity.
Returns:
a new Entity with the specified name.

createRelation

public Relation createRelation(Relation.TypesOfRelation type,
                               Entity caller,
                               Entity called)
Creates a new Relation.

Specified by:
createRelation in interface AbstractElementsFactory
Parameters:
type - the type of the relation.
caller - the caller of the relation.
called - the called of the relation.
Returns:
a new Relation.