org.zeroexchange.model
Class EntityUtils

java.lang.Object
  extended by org.zeroexchange.model.EntityUtils

public class EntityUtils
extends Object

Set of auxiliary methods to retrieve entity-related meta information.

Author:
black

Constructor Summary
EntityUtils()
           
 
Method Summary
static Class getAssociatedItemClass(PropertyDescriptor propertyDescriptor)
          Returns the class of the entities from the association which is specified with by the propertyDescriptor
static boolean isAssociation(Class itemClass, PropertyDescriptor propertyDescriptor)
          Returns true if the specified descriptor represents an association.
static boolean isManyToMany(Class itemClass, PropertyDescriptor propertyDescriptor)
          Returns true if descriptor represents the 'many-to-many' association.
static boolean isManyToOne(Class itemClass, PropertyDescriptor propertyDescriptor)
          Returns true if descriptor represents the 'many-to-one' association.
static boolean isOneToMany(Class itemClass, PropertyDescriptor propertyDescriptor)
          Returns true if descriptor represents the 'one-to-many' association.
static boolean isOneToOne(Class itemClass, PropertyDescriptor propertyDescriptor)
          Returns true if descriptor represents the 'one-to-one' association.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityUtils

public EntityUtils()
Method Detail

isAssociation

public static boolean isAssociation(Class itemClass,
                                    PropertyDescriptor propertyDescriptor)
Returns true if the specified descriptor represents an association.

Parameters:
itemClass -

isOneToMany

public static boolean isOneToMany(Class itemClass,
                                  PropertyDescriptor propertyDescriptor)
Returns true if descriptor represents the 'one-to-many' association.

Parameters:
itemClass -

isOneToOne

public static boolean isOneToOne(Class itemClass,
                                 PropertyDescriptor propertyDescriptor)
Returns true if descriptor represents the 'one-to-one' association.

Parameters:
itemClass -

isManyToMany

public static boolean isManyToMany(Class itemClass,
                                   PropertyDescriptor propertyDescriptor)
Returns true if descriptor represents the 'many-to-many' association.

Parameters:
itemClass -

isManyToOne

public static boolean isManyToOne(Class itemClass,
                                  PropertyDescriptor propertyDescriptor)
Returns true if descriptor represents the 'many-to-one' association.

Parameters:
itemClass -

getAssociatedItemClass

public static Class getAssociatedItemClass(PropertyDescriptor propertyDescriptor)
Returns the class of the entities from the association which is specified with by the propertyDescriptor



Copyright © 2013. All Rights Reserved.