|
Dresden OCL Toolkit | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttudresden.ocl.codegen.decl.MappedClass
This class represents a mapped class from the object model.
The class should be mapped using an implementation
of ORMappingScheme.
The four basic characteristics of a mapped class are:
ORMappingScheme| Nested Class Summary | |
private class |
MappedClass.AssociationEnd
|
| Field Summary | |
private Set |
associationEnds
a Set of association ends |
(package private) String |
className
the name of the class |
private static String |
EX_MC_ND
|
private static String |
EX_MC_NULL
|
private static String |
EX_NAME_NULL
|
private static String |
EX_NO_AE
|
private static String |
EX_NO_GUIDE
|
private static String |
EX_OP_NULL
|
private static String |
EX_PAR_NULL
|
private static String |
EX_TABLE_NULL
|
private Set |
queries
a Set containing all method names of the class for which isQuery holds |
private Map |
superclasses
a Map of all direct superclass names to the MappedClass objects of the superclasses |
private List |
tables
a List of tables this class is mapped to |
| Constructor Summary | |
MappedClass(String name)
Creates a new MappedClass object. |
|
| Method Summary | |
void |
addAssociationEnd(String roleName,
MappedClass ae)
Adds an asscociation end to the MappedClass object. |
void |
addJoinGuide(String name,
Guide guide)
Adds a join guide to the MappedClass object. |
void |
addQuery(String name)
|
void |
addSuperclass(String name,
MappedClass mc)
|
void |
addTable(Table table)
|
Set |
allSupertypes()
|
Set |
associationEnds()
|
Set |
attributes()
|
private MappedClass.AssociationEnd |
getAssEnd(String name)
Note: This methode does not consider superclasses ! |
MappedClass |
getAssociationEnd(String name)
|
Guide |
getAttributeGuide(String name)
|
List |
getAttributeGuides(String name)
|
String |
getClassName()
|
Guide |
getJoinGuide(String name)
|
List |
getJoinGuides(String name)
|
List |
getTables()
|
boolean |
hasTable(String name)
|
boolean |
isAssociationEnd(String name)
|
boolean |
isAttribute(String name)
|
boolean |
isQuery(String name)
|
Set |
operations()
|
Set |
supertypes()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static String EX_NAME_NULL
private static String EX_TABLE_NULL
private static String EX_OP_NULL
private static String EX_MC_NULL
private static String EX_PAR_NULL
private static String EX_NO_GUIDE
private static String EX_NO_AE
private static String EX_MC_ND
String className
private List tables
private Set queries
private Set associationEnds
private Map superclasses
| Constructor Detail |
public MappedClass(String name)
throws NullPointerException
name - the class name from the object model
NullPointerException - if the name is null| Method Detail |
public void addTable(Table table)
throws NullPointerException
table - a table the class is mapped to
NullPointerException - if table is null
public void addQuery(String name)
throws NullPointerException
name - the methode for which isQuery holds
NullPointerException - if the name is null
public void addAssociationEnd(String roleName,
MappedClass ae)
throws NullPointerException
roleName - the role name of the association end or nullae - the MappedClass object related to the rolename
NullPointerException - if ae is null
public void addJoinGuide(String name,
Guide guide)
throws NullPointerException
name - the name of the association end the join guide leads toguide - the join guide
NullPointerException - if one of the parameters is null
public void addSuperclass(String name,
MappedClass mc)
throws NullPointerException
name - the name of the superclass
NullPointerException - if one of the parameters is nullpublic String getClassName()
public List getJoinGuides(String name)
throws IllegalArgumentException
name - the name of the association end the join guide is supposed to lead to
IllegalArgumentException - if name is not the name of an association end
public Guide getJoinGuide(String name)
throws IllegalArgumentException,
IllegalStateException,
NullPointerException
name - the name of the association end the join guide is supposed to lead to
IllegalArgumentException - if name is not the name of an association end
IllegalStateException - if the number of Guide objects to be returned is greater than 1
NullPointerException - if the association end exists but no Guide is defined
public List getAttributeGuides(String name)
throws IllegalArgumentException
name - the name of an attribute of the mapped class
IllegalArgumentException - if name is not a valid attribute name
public Guide getAttributeGuide(String name)
throws IllegalStateException
name - the name of an attribute of the mapped class
IllegalStateException - if more than one Guide exists for the attribute
NullPointerException - if no attribute guide exists
public MappedClass getAssociationEnd(String name)
throws IllegalArgumentException,
NullPointerException,
IllegalStateException
name - the name of the association end
IllegalArgumentException - if name is not a valid association end
NullPointerException - if no MappedClass object is defined for the association end
IllegalStateException - if more than one MappedClass exists
public boolean isAttribute(String name)
throws NullPointerException
name - a classifier from the class model
NullPointerException - if name is null
public boolean isAssociationEnd(String name)
throws NullPointerException
name - a classifier from the class model
NullPointerException - if the name is null
public boolean isQuery(String name)
throws NullPointerException
name - a classifier from the class model
NullPointerException - if the name is nullpublic List getTables()
public boolean hasTable(String name)
throws NullPointerException
name - a table name
NullPointerException - if the name is nullpublic Set attributes()
public Set associationEnds()
public Set operations()
public Set supertypes()
public Set allSupertypes()
private MappedClass.AssociationEnd getAssEnd(String name)
throws NoSuchElementException
if - no association end with the given name exists
NoSuchElementException
|
Dresden OCL Toolkit | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||