|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.metadata.JoinType
de.mguennewig.pobjects.metadata.NestedSetType
public class NestedSetType
Rows of the target table represent a nested set associated with the parent table.
The target table must fulfill multiple requirements that are described
in setTargetClass(ClassDecl).
| Field Summary |
|---|
| Fields inherited from class de.mguennewig.pobjects.metadata.JoinType |
|---|
CLASS_NAME, TYPE_NAME |
| Constructor Summary | |
|---|---|
NestedSetType(java.lang.String targetModule,
java.lang.String targetName,
ClassDecl targetClass,
java.lang.String rightColumnName)
Initialize a nested set type. |
|
| Method Summary | |
|---|---|
Column |
getLeftColumn()
Returns the column that holds the left most subset. |
Column |
getRightColumn()
Returns the column that holds the right most subset. |
java.lang.String |
name(int variant)
Returns different names depending on variant for the code
generator. |
void |
setTargetClass(ClassDecl te)
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 |
|---|
public NestedSetType(java.lang.String targetModule,
java.lang.String targetName,
ClassDecl targetClass,
java.lang.String rightColumnName)
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.rightColumnName - The column that holds the right subset.setTargetClass(ClassDecl)| Method Detail |
|---|
public final Column getLeftColumn()
public final Column getRightColumn()
public void setTargetClass(ClassDecl te)
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)In addition to the generic restrictions a nested set adds the following:
left column.right column
setTargetClass in interface ReferenceToClasssetTargetClass in class JoinTypepublic java.lang.String name(int variant)
variant for the code
generator.
name in class JoinType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||