|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.metadata.JoinType
public abstract class JoinType
Non scalar type denoting a join between two tables.
On the SQL level, this type is not materialized at all. The
child table must follow a certain structure, depending on the type
of the join. The parent table defines a join element
using one of the subclasses of JoinType to declare the
semantics of the relationship between the parent and child
data.
| Field Summary | |
|---|---|
static int |
CLASS_NAME
Return the name of the Java class that holds the type information of this Type in the Java application. |
static int |
TYPE_NAME
Name of the Java type used to access values of this JoinType. |
| Constructor Summary | |
|---|---|
JoinType(java.lang.String targetModule,
java.lang.String targetName,
ClassDecl targetClass)
Initialize join type. |
|
| Method Summary | |
|---|---|
ClassDecl |
getTargetClass()
Returns the class declaration of the referenced table. |
java.lang.String |
getTargetModule()
Returns the name of the module to which the referenced table belongs. |
java.lang.String |
getTargetName()
Returns the name of the class the pointer (or foreign key) refers to. |
java.lang.String |
name(int variant)
Returns different names depending on variant for the code
generator. |
void |
setTargetClass(ClassDecl targetClass)
Sets the class declaration of the referenced table. |
void |
setTypeClass(java.lang.String typeClass)
Sets the fully qualified class name of the type class that should be used instead of this one. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_NAME
JoinType.
public static final int CLASS_NAME
Type in the Java application.
| Constructor Detail |
|---|
public JoinType(java.lang.String targetModule,
java.lang.String targetName,
ClassDecl targetClass)
targetModule - Module of the target class.targetName - The name of the class the join refers to.targetClass - The class declaration of the referenced table. This
must be given or null with a later call to
setTargetClass(ClassDecl) before any usage of this type.setTargetClass(ClassDecl)| Method Detail |
|---|
public final java.lang.String getTargetModule()
ReferenceToClass
getTargetModule in interface ReferenceToClassReferenceToClass.getTargetName(),
ReferenceToClass.getTargetClass()public final java.lang.String getTargetName()
ReferenceToClass
getTargetName in interface ReferenceToClasspublic final ClassDecl getTargetClass()
class declaration of the referenced table.
getTargetClass in interface ReferenceToClasssetTargetClass(de.mguennewig.pobjects.metadata.ClassDecl)public void setTargetClass(ClassDecl targetClass)
class declaration of the referenced table.
A call to this method is only necessary if the class declaration has not been passed to the constructor to solve circle problems.
The referenced table must fulfill a couple of requirements depending on join type. The following requirements are common for all:
primary key declaration
(no id field)
setTargetClass in interface ReferenceToClassjava.lang.IllegalArgumentException - if the given target class does not
fulfill the requirements of this join type.
java.lang.IllegalStateException - if target class is already set.public final void setTypeClass(java.lang.String typeClass)
public java.lang.String name(int variant)
variant for the code
generator.
java.lang.IllegalArgumentException - if variant is unknown.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||