com.scooterframework.orm.activerecord
Class HasManyThroughRelation

java.lang.Object
  extended by com.scooterframework.orm.activerecord.Relation
      extended by com.scooterframework.orm.activerecord.HasManyThroughRelation

public class HasManyThroughRelation
extends Relation

HasManyThroughRelation class has information about has-many-through relationship between objects.


Field Summary
protected  Relation acRelation
           
protected  Relation cbRelation
           
protected  java.util.Map<java.lang.String,java.lang.Object> joinInputs
           
protected  java.lang.String throughAssociation
           
 
Fields inherited from class com.scooterframework.orm.activerecord.Relation
associationId, BELONGS_TO_TYPE, CASCADE_DELETE, CASCADE_NONE, CASCADE_NULLIFY, CASCADE_SIMPLY_DELETE, HAS_MANY_THROUGH_TYPE, HAS_MANY_TYPE, HAS_ONE_TYPE, key, mapping, ownerClass, ownerModel, properties, REVERSE_RELATION, targetClass, targetModel, type
 
Constructor Summary
HasManyThroughRelation(java.lang.Class<? extends ActiveRecord> ownerClass, java.lang.String associationId, java.lang.String throughAssociation, Relation acRelation, Relation cbRelation)
           
 
Method Summary
 java.lang.String getACMapping()
          Returns mapping between endA and middleC.
 Relation getACRelation()
          Return AC relation.
 java.lang.String getCBMapping()
          Returns mapping between middleC and endB.
 Relation getCBRelation()
          Return CB relation.
 java.util.Map<java.lang.String,java.lang.Object> getJoinInputs()
          Returns data map for the middleC join table.
 java.lang.Class<? extends ActiveRecord> getMiddleC()
          Returns the middle C class.
 java.lang.String getThroughAssociation()
          Returns the through association target.
 void setJoinInputs(java.util.Map<java.lang.String,java.lang.Object> joinInputs)
          Sets data map for the middleC join table.
 
Methods inherited from class com.scooterframework.orm.activerecord.Relation
allowCascade, allowCascadeDelete, allowCascadeNone, allowCascadeNullify, allowCascadeSimplyDelete, getAssociation, getConditionsString, getConditionsString, getLeftSideMappingItems, getMapping, getMappingMap, getOwnerClass, getOwnerModel, getProperties, getRelationKey, getRelationType, getReverseMapping, getReverseMappingMap, getReverseRelation, getReverseRelationName, getReverseRelationType, getRightSideMappingItems, getTargetClass, getTargetModel, setProperties, setRelationKey, setTargetClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

throughAssociation

protected java.lang.String throughAssociation

acRelation

protected Relation acRelation

cbRelation

protected Relation cbRelation

joinInputs

protected java.util.Map<java.lang.String,java.lang.Object> joinInputs
Constructor Detail

HasManyThroughRelation

public HasManyThroughRelation(java.lang.Class<? extends ActiveRecord> ownerClass,
                              java.lang.String associationId,
                              java.lang.String throughAssociation,
                              Relation acRelation,
                              Relation cbRelation)
Method Detail

getThroughAssociation

public java.lang.String getThroughAssociation()
Returns the through association target.

Returns:
the through association target

getJoinInputs

public java.util.Map<java.lang.String,java.lang.Object> getJoinInputs()
Returns data map for the middleC join table.

Returns:
joinInputs data map for the middleC join table

setJoinInputs

public void setJoinInputs(java.util.Map<java.lang.String,java.lang.Object> joinInputs)
Sets data map for the middleC join table.

Parameters:
joinInputs - data map for the middleC join table

getACRelation

public Relation getACRelation()
Return AC relation.


getCBRelation

public Relation getCBRelation()
Return CB relation.


getMiddleC

public java.lang.Class<? extends ActiveRecord> getMiddleC()
Returns the middle C class.

Returns:
the middle C class

getACMapping

public java.lang.String getACMapping()
Returns mapping between endA and middleC.

Returns:
acMapping string

getCBMapping

public java.lang.String getCBMapping()
Returns mapping between middleC and endB.

Returns:
cbMapping string