|
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.Guide
This class holds information about navigation in relational schemes as kind of steps of select-from-where clauses. One guide is dedicated to describe either navigations over tables or simple attribute access. If a guide is dedicated to describe a navigation or attribute access can be queried by the according methode. If a navigation or attribute access requires more than one table access, each access must be described with a separate Guide object. In that case, MappedClass objects then return an array of Guide objects. Guides must lead from the target table to the table from where the navigation or attribute starts. The start table is called the context table. Since it is possible to start from a table that uses an alias, the alias in use should be stored within the Guide object too.
MappedClass
Nested Class Summary | |
private class |
Guide.Step
|
Field Summary | |
private String |
contextAlias
the alias for the context table, should be null if it is no final guide |
private static String |
EX_NO_ALIAS
|
private boolean |
isNavigation
a flag that holds information about the interpretation of the class data |
private int |
pointer
a pointer that points the current step |
private List |
steps
a List containing all the steps |
Constructor Summary | |
Guide(boolean navigation)
Creates a new Guide. |
|
Guide(boolean navigation,
String contextAlias)
Creates a new Guide. |
Method Summary | |
void |
add(String select,
String from,
String where)
Add a select-from-where clause. |
String |
getAlias()
|
String |
getFrom()
|
String |
getSelect()
|
String |
getWhere()
|
boolean |
hasMoreSteps()
|
boolean |
isNavigation()
|
void |
next()
Set the navigation pointer to next select-from-where clause. |
int |
numberOfSteps()
|
void |
reset()
Resets the navigation pointer. |
void |
setAlias(String contextAlias)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static String EX_NO_ALIAS
private List steps
private boolean isNavigation
private int pointer
private String contextAlias
Constructor Detail |
public Guide(boolean navigation, String contextAlias)
navigation
- true if the guide describes a navigation, false otherwisecontextAlias
- the context alias of the start tablepublic Guide(boolean navigation)
navigation
- true if the guide describes a navigation, false otherwiseMethod Detail |
public void add(String select, String from, String where) throws NullPointerException
select
- the select partfrom
- the from partwhere
- the where part
NullPointerException
- if one of the parameters is nullpublic void reset()
public void next() throws IllegalStateException
IllegalStateException
- if there is no next steppublic boolean hasMoreSteps()
public String getSelect() throws IllegalStateException
IllegalStateException
- if the client failed to call next() after reset() or object creationpublic String getFrom() throws IllegalStateException
IllegalStateException
- if the client failed to call next() after reset() or object creationpublic String getWhere() throws IllegalStateException
IllegalStateException
- if the client failed to call next() after reset() or object creationpublic boolean isNavigation()
public int numberOfSteps()
public void setAlias(String contextAlias)
public String getAlias() throws NullPointerException
NullPointerException
- if no context alias is specifiedpublic String toString()
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |