Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.map
Class DbJoin

    java.lang.Object
      org.apache.cayenne.map.DbJoin

All Implemented Interfaces:
  XMLSerializable

    public class DbJoin

extends java.lang.Object
implements XMLSerializable

Defines a join between two attributes of a given relationship.

Since:
  1.1
Author:
  Andrei Adamchik

Field Summary
`protected DbRelationship` | `relationship`
`protected java.lang.String` | `sourceName`
`protected java.lang.String` | `targetName`

Constructor Summary
`protected` | `DbJoin()`
`` | `DbJoin(DbRelationship relationship)`
`` | `DbJoin(DbRelationship relationship, java.lang.String sourceName, java.lang.String targetName)`

Method Summary
`DbJoin` | `createReverseJoin()` Returns a "reverse" join.
`void` | `encodeAsXML(XMLEncoder encoder)` Prints itself as XML to the provided XMLEncoder.
`DbRelationship` | `getRelationship()`
`DbAttribute` | `getSource()` Returns DbAttribute on on the left side of the join.
`java.lang.String` | `getSourceName()`
`DbAttribute` | `getTarget()`
`java.lang.String` | `getTargetName()`
`void` | `setRelationship(DbRelationship relationship)`
`void` | `setSourceName(java.lang.String string)`
`void` | `setTargetName(java.lang.String string)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### relationship

    protected DbRelationship relationship

### sourceName

    protected java.lang.String sourceName

### targetName

    protected java.lang.String targetName

Constructor Detail

### DbJoin

    protected DbJoin()

### DbJoin

    public DbJoin(DbRelationship relationship)

### DbJoin

    public DbJoin(DbRelationship relationship,
                  java.lang.String sourceName,
                  java.lang.String targetName)

Method Detail

### createReverseJoin

    public DbJoin createReverseJoin()

  Returns a "reverse" join. Join source relationship is not set and must be initialized by the caller.

### getSource

    public DbAttribute getSource()

  Returns DbAttribute on on the left side of the join.

### getTarget

    public DbAttribute getTarget()

### encodeAsXML

    public void encodeAsXML(XMLEncoder encoder)

  Prints itself as XML to the provided XMLEncoder.

  Specified by:
    `encodeAsXML` in interface `XMLSerializable`

### getRelationship

    public DbRelationship getRelationship()

### getSourceName

    public java.lang.String getSourceName()

### getTargetName

    public java.lang.String getTargetName()

### setRelationship

    public void setRelationship(DbRelationship relationship)

### setSourceName

    public void setSourceName(java.lang.String string)

### setTargetName

    public void setTargetName(java.lang.String string)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.