thinkmap.datasource.database
Class EntityRelation

java.lang.Object
  extended by thinkmap.datasource.database.EntityRelation

public class EntityRelation
extends Object

The Relation between one entity and another.

Version:
$Revision: 1.1 $

Constructor Summary
EntityRelation()
          Empty constructor.
EntityRelation(String name, Binding entityType, boolean isReciprocal, Binding[] ids)
          Constructor that specifies everything
 
Method Summary
 Binding getEntityType()
          Get the entity type of mapped entities.
 Binding[] getIdBindings()
          Get the id column index array.
 boolean getIsReciprocal()
          Determine if the relation specified in this mapping is reciprocal.
 String getName()
          Get the name of the relation that connects this entity and the related entity.
 void setEntityType(Binding entityType)
          Set the entity type of mapped entities.
 void setIdBindings(Binding[] ids)
          Set the id column index array.
 void setIsReciprocal(boolean isReciprocal)
          Set whether or not the relation specified in this mapping is reciprocal.
 void setName(String name)
          Sets the name of the relation that connects this entity and the related entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityRelation

public EntityRelation()
Empty constructor. Will mostly be used for XML configuration.


EntityRelation

public EntityRelation(String name,
                      Binding entityType,
                      boolean isReciprocal,
                      Binding[] ids)
Constructor that specifies everything

Method Detail

setEntityType

public void setEntityType(Binding entityType)
Set the entity type of mapped entities.

Parameters:
entityType - entity type

getEntityType

public Binding getEntityType()
Get the entity type of mapped entities.

Returns:
entity type

setIsReciprocal

public void setIsReciprocal(boolean isReciprocal)
Set whether or not the relation specified in this mapping is reciprocal.

Parameters:
isReciprocal - true if the relation is reciprocal

getIsReciprocal

public boolean getIsReciprocal()
Determine if the relation specified in this mapping is reciprocal.

Returns:
true if the relation is reciprocal

getName

public String getName()
Get the name of the relation that connects this entity and the related entity.

Returns:
the name of the relation that connects this entity and the related entity

setName

public void setName(String name)
Sets the name of the relation that connects this entity and the related entity.


setIdBindings

public void setIdBindings(Binding[] ids)
Set the id column index array.

Parameters:
ids - column indices

getIdBindings

public Binding[] getIdBindings()
Get the id column index array.

Returns:
id column indices


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.