|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.map.Relationship
public abstract class Relationship
Defines a relationship between two entities. In a DataMap graph relationships represent "arcs" connecting entity "nodes". Relationships are directional, i.e. they have a notion of source and target entity. This makes DataMap a "digraph".
Field Summary | |
---|---|
protected java.lang.String |
name
|
protected Entity |
sourceEntity
|
protected java.lang.String |
targetEntityName
|
protected boolean |
toMany
|
Constructor Summary | |
---|---|
Relationship()
Creates an unnamed relationship. |
|
Relationship(java.lang.String name)
Creates a named relationship. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name property of this object. |
java.lang.Object |
getParent()
Returns the parent map. |
Entity |
getSourceEntity()
Returns relationship source entity. |
abstract Entity |
getTargetEntity()
Returns a target entity of the relationship. |
java.lang.String |
getTargetEntityName()
Returns the name of a target entity. |
boolean |
isToMany()
Returns a boolean value that determines relationship multiplicity. |
void |
setName(java.lang.String name)
|
void |
setParent(java.lang.Object parent)
Stores the parent map. |
void |
setSourceEntity(Entity sourceEntity)
Sets relationship source entity. |
void |
setTargetEntity(Entity targetEntity)
Sets relationship target entity. |
void |
setTargetEntityName(java.lang.String targetEntityName)
Sets the name of relationship target entity. |
java.lang.String |
toString()
Overrides Object.toString() to return informative description. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.cayenne.util.XMLSerializable |
---|
encodeAsXML |
Field Detail |
---|
protected java.lang.String name
protected Entity sourceEntity
protected java.lang.String targetEntityName
protected boolean toMany
Constructor Detail |
---|
public Relationship()
public Relationship(java.lang.String name)
Method Detail |
---|
public java.lang.String getName()
CayenneMapEntry
getName
in interface CayenneMapEntry
public void setName(java.lang.String name)
public Entity getSourceEntity()
public void setSourceEntity(Entity sourceEntity)
public abstract Entity getTargetEntity()
public void setTargetEntity(Entity targetEntity)
setTargetEntityName
.
public java.lang.String getTargetEntityName()
public void setTargetEntityName(java.lang.String targetEntityName)
public boolean isToMany()
public java.lang.Object getParent()
CayenneMapEntry
getParent
in interface CayenneMapEntry
public void setParent(java.lang.Object parent)
CayenneMapEntry
setParent
in interface CayenneMapEntry
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |