de.greenrobot.daogenerator
Class ToMany

java.lang.Object
  extended by de.greenrobot.daogenerator.ToMany

public class ToMany
extends java.lang.Object

    

To-many relationship from a source entity to many target entitites.


Constructor Summary
ToMany(Schema schema, Entity sourceEntity, Property[] sourceProperties, Entity targetEntity, Property[] targetProperties)
           
 
Method Summary
 java.lang.String getName()
           
 java.lang.String getOrder()
           
 Entity getSourceEntity()
           
 Property[] getSourceProperties()
           
 Entity getTargetEntity()
           
 Property[] getTargetProperties()
           
 void orderAsc(Property... properties)
          Property of target entity used for ascending order.
 void orderDesc(Property... properties)
          Property of target entity used for descending order.
 void setName(java.lang.String name)
          Sets the name of the relation, which is used as the property name in the entity (the source entity owning the to-many relationship).
 void setSourceProperties(Property[] sourceProperties)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToMany

public ToMany(Schema schema,
              Entity sourceEntity,
              Property[] sourceProperties,
              Entity targetEntity,
              Property[] targetProperties)
Method Detail

getSourceEntity

public Entity getSourceEntity()

getTargetEntity

public Entity getTargetEntity()

getSourceProperties

public Property[] getSourceProperties()

setSourceProperties

public void setSourceProperties(Property[] sourceProperties)

getTargetProperties

public Property[] getTargetProperties()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)
Sets the name of the relation, which is used as the property name in the entity (the source entity owning the to-many relationship).


orderAsc

public void orderAsc(Property... properties)
Property of target entity used for ascending order.


orderDesc

public void orderDesc(Property... properties)
Property of target entity used for descending order.


getOrder

public java.lang.String getOrder()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011-2012 greenrobot.de. All Rights Reserved.