public class EntityRelationship
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EntityRelationship.RelationshipType
Type of relationship - OneToOne, OneToMany, ManyToOne or ManyToMany
|
Constructor and Description |
---|
EntityRelationship(java.lang.String name, EntityRelationship.RelationshipType type, java.lang.String fromEntity, java.lang.String fromAttr, java.lang.String toEntity, java.lang.String toAttr)
Constructs Entity Relationship definition.
|
EntityRelationship(java.lang.String name, EntityRelationship.RelationshipType type, java.lang.String fromEntity, java.lang.String fromAttr, java.lang.String toEntity, java.lang.String toAttr, boolean recursive)
Constructs Entity Relationship definition
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks if the given object is equals to this one
|
java.lang.String |
getFromAttr()
Gets FromAttribute in the entity relation.
|
java.lang.String |
getFromEntity()
Gets FromEntity in the entity relation
|
java.lang.String |
getName()
Gets Entity Relationship name
|
java.lang.String |
getToAttr()
Gets ToAttribute in the entity relation.
|
java.lang.String |
getToEntity()
Gets ToEntity in the entity relation
|
EntityRelationship.RelationshipType |
getType()
Gets entity relationship type
|
boolean |
isRecursive()
Gets the recursive flag
|
void |
setFromAttr(java.lang.String fromAttr)
Sets FromAttribute in the entity relation.
|
void |
setFromEntity(java.lang.String fromEntity)
Sets FromEntity in the entity relation
|
void |
setRecursive(boolean recursive)
Sets the recursive flag to true/false.
|
void |
setToAttr(java.lang.String toAttr)
Sets ToAttribute in the entity relation.
|
void |
setToEntity(java.lang.String toEntity)
Sets the ToEntity in the entity relation
|
void |
setType(EntityRelationship.RelationshipType type)
Sets the entity relationship type
|
public EntityRelationship(java.lang.String name, EntityRelationship.RelationshipType type, java.lang.String fromEntity, java.lang.String fromAttr, java.lang.String toEntity, java.lang.String toAttr, boolean recursive)
name
- Name of entity relationshiptype
- Entity Relationship typefromEntity
- Name of the first entityfromAttr
- First entity's attribute in which related entity info existstoEntity
- Name of the second entitytoAttr
- Second entity's attribute in which related entity info existsrecursive
- true if the relationship is nested relation ; false otherwisepublic EntityRelationship(java.lang.String name, EntityRelationship.RelationshipType type, java.lang.String fromEntity, java.lang.String fromAttr, java.lang.String toEntity, java.lang.String toAttr)
name
- Name of entity relationshiptype
- Entity Relationship typefromEntity
- Name of the first entityfromAttr
- First entity's attribute in which related entity info existstoEntity
- Name of the second entitytoAttr
- Second entity's attribute in which related entity info existspublic java.lang.String getName()
public void setType(EntityRelationship.RelationshipType type)
type
- Entity relationship typepublic EntityRelationship.RelationshipType getType()
public void setFromEntity(java.lang.String fromEntity)
fromEntity
- Name of FromEntitypublic java.lang.String getFromEntity()
public void setFromAttr(java.lang.String fromAttr)
fromAttr
- FromAttribute namepublic java.lang.String getFromAttr()
public void setToEntity(java.lang.String toEntity)
toEntity
- Name of the ToEntity in the entity relationpublic java.lang.String getToEntity()
public void setToAttr(java.lang.String toAttr)
toAttr
- ToAttribute namepublic java.lang.String getToAttr()
public void setRecursive(boolean recursive)
recursive
- true if entity relationship is of nested relation type ; false otherwisepublic boolean isRecursive()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object