|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiitb.con.core.Type
iitb.con.core.Relation
public class Relation
Relation is associated with two entities.
Relation class provides methods to create and remove the
relations among the entities.
The relation is created between two items, which is considered
as left-item and right-item. To remove any item, set NULL
.
Type
,
RelationInstance
Field Summary | |
---|---|
static byte |
BIDIRECTIONAL
Relation direction bidirectional for left- and right-item |
static byte |
LEFT_TO_RIGHT
Relation direction from left item to right item |
java.lang.String |
leftRole
Relation's left role name |
java.lang.String |
rightRole
Relation's right role name |
Fields inherited from class iitb.con.core.Type |
---|
id, name |
Constructor Summary | |
---|---|
Relation()
|
|
Relation(java.lang.String name)
Constructs the Relation with name |
|
Relation(java.lang.String name,
java.lang.String leftRole,
java.lang.String rightRole)
Constructs the Relation with name and roles |
Method Summary | |
---|---|
byte |
getDirection()
Returns the direction kind in the relation. 0 - LEFT_TO_RIGHT 1 - BIDIRECTIONAL |
static java.lang.String |
getDirectionString(byte direction)
Returns the direction kind in the relation as string. |
short |
getLeftEntityId()
Returns the left entity id of the relation |
short |
getRightEntityId()
Returns the right entity id of the relation |
Result |
setDirection(byte direction)
Sets the direction kind of the Relation. |
Result |
setLeft(Entity entity)
Sets the entity type for the left item. |
Result |
setLeftEntityId(short leftEntityId)
Set the left entity id of the relation. |
Result |
setRight(Entity entity)
Sets the entity type for the right item. |
Result |
setRightEntityId(short rightEntityId)
Set the right entity id of the relation. |
Methods inherited from class iitb.con.core.Type |
---|
addAttribute, addAttribute, getAllAttributes, getAllRepeatingAttributes, getAllSingleValuedAttributes, getAttribute, getAttributesCount, hasAttribute, removeAttribute, setAllAttributes, setAttribute, setAttribute |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static byte BIDIRECTIONAL
public static byte LEFT_TO_RIGHT
public java.lang.String leftRole
public java.lang.String rightRole
Constructor Detail |
---|
public Relation()
public Relation(java.lang.String name)
Relation
with name
name
- relation namepublic Relation(java.lang.String name, java.lang.String leftRole, java.lang.String rightRole)
Relation
with name and roles
name
- relation nameleftRole
- left role namerightRole
- right role nameMethod Detail |
---|
public byte getDirection()
public static java.lang.String getDirectionString(byte direction)
direction
- relation's direction kind
public short getLeftEntityId()
public short getRightEntityId()
public Result setDirection(byte direction)
direction
- direction link
Result
public Result setLeft(Entity entity)
entity
- Entity
Result
public Result setLeftEntityId(short leftEntityId)
leftEntityId
- the leftEntityId to set
Result
public Result setRight(Entity entity)
entity
- Entity
Result
public Result setRightEntityId(short rightEntityId)
rightEntityId
- the rightEntityId to set
Result
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |