de.mguennewig.pobjects.metadata
Class SetType

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.JoinType
      extended by de.mguennewig.pobjects.metadata.SetType
All Implemented Interfaces:
ReferenceToClass

public class SetType
extends JoinType

Rows of the target table represent a set of values associated with the parent table.


Field Summary
 
Fields inherited from class de.mguennewig.pobjects.metadata.JoinType
CLASS_NAME, TYPE_NAME
 
Constructor Summary
SetType(java.lang.String targetModule, java.lang.String targetName, ClassDecl targetClass)
          Initialize set data.
 
Method Summary
 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.
 
Methods inherited from class de.mguennewig.pobjects.metadata.JoinType
getTargetClass, getTargetModule, getTargetName, setTypeClass
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetType

public SetType(java.lang.String targetModule,
               java.lang.String targetName,
               ClassDecl targetClass)
Initialize set data.

Parameters:
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.
See Also:
setTargetClass(ClassDecl)
Method Detail

setTargetClass

public void setTargetClass(ClassDecl targetClass)
Sets the 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:

In addition to the generic restrictions a set type adds the following constraint:

Specified by:
setTargetClass in interface ReferenceToClass
Overrides:
setTargetClass in class JoinType

name

public java.lang.String name(int variant)
Returns different names depending on variant for the code generator.

Overrides:
name in class JoinType