com.bm.introspectors.relations
Class ManyToOneReleation

java.lang.Object
  extended by com.bm.introspectors.relations.AbstractRelation
      extended by com.bm.introspectors.relations.ManyToOneReleation
All Implemented Interfaces:
EntityReleationInfo

public class ManyToOneReleation
extends AbstractRelation
implements EntityReleationInfo

Represents a ManyToOne relation.

Author:
Daniel Wiese

Constructor Summary
ManyToOneReleation(java.lang.Class sourceClass, java.lang.Class targetClass, Property sourceProperty, Property targetProperty, javax.persistence.ManyToOne annotation)
          Default constructor.
 
Method Summary
 RelationType getReleationType()
          Returns the type of the relation.
 java.util.Set<Property> getTargetKeyProperty()
          Returns the primary key properties of the target class
 void setTargetKeyProperty(java.util.Set<Property> targetKeyProp)
          Sets the primary key properties of the target class
 
Methods inherited from class com.bm.introspectors.relations.AbstractRelation
getCascadeType, getFetchType, getSourceClass, getSourceProperty, getTargetClass, getTargetProperty, isCascadeOnDelete, isUnidirectional, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.bm.introspectors.relations.EntityReleationInfo
isCascadeOnDelete, isUnidirectional
 

Constructor Detail

ManyToOneReleation

public ManyToOneReleation(java.lang.Class sourceClass,
                          java.lang.Class targetClass,
                          Property sourceProperty,
                          Property targetProperty,
                          javax.persistence.ManyToOne annotation)
Default constructor.

Parameters:
sourceClass - - the type of the source entity bean
targetClass - - the type of the target entity bean
sourceProperty - - the property of the source entity bean
targetProperty - - the property of the target entity bean
annotation - - the annotation (with values)
Method Detail

getReleationType

public RelationType getReleationType()
Returns the type of the relation.

Specified by:
getReleationType in interface EntityReleationInfo
Returns:
the type of the relation.
See Also:
EntityReleationInfo.getReleationType()

getTargetKeyProperty

public java.util.Set<Property> getTargetKeyProperty()
Returns the primary key properties of the target class

Specified by:
getTargetKeyProperty in interface EntityReleationInfo
Overrides:
getTargetKeyProperty in class AbstractRelation
Returns:
the primary key properties of the target class

setTargetKeyProperty

public void setTargetKeyProperty(java.util.Set<Property> targetKeyProp)
Sets the primary key properties of the target class

Parameters:
targetKeyProp -


Copyright © 2008. All Rights Reserved.