org.apache.cayenne.gen
Class EntityUtils

java.lang.Object
  extended by org.apache.cayenne.gen.EntityUtils

public class EntityUtils
extends Object

Attributes and Methods for working with ObjEntities.

Since:
1.2

Field Summary
protected  String baseClassName
           
protected  String basePackageName
           
protected  Collection<String> callbackNames
           
protected  ObjEntity objEntity
           
protected  DataMap primaryDataMap
           
protected  String subClassName
           
protected  String subPackageName
           
protected  String superClassName
           
protected  String superPackageName
           
 
Constructor Summary
EntityUtils(DataMap dataMap, ObjEntity objEntity, String fqnBaseClass, String fqnSuperClass, String fqnSubClass)
           
 
Method Summary
 Collection<String> getCallbackNames()
           
 MappingNamespace getEntityResolver()
          Returns the EntityResolver for this set of DataMaps.
 String getMapKeyType(ObjRelationship relationship)
          Returns the map key type for a collection relationship of type java.util.Map.
 DataMap getPrimaryDataMap()
           
 boolean hasToManyDeclaredRelationships()
          Returns true if current ObjEntity contains at least one toMany relationship, ignoring those declared in superentities.
 boolean hasToManyDeclaredRelationships(ObjEntity anObjEntity)
          Returns true if an ObjEntity contains at least one toMany relationship, ignoring those declared in superentities.
 boolean hasToManyRelationships()
          Returns true if current ObjEntity contains at least one toMany relationship.
 boolean hasToManyRelationships(ObjEntity anObjEntity)
          Returns true if an ObjEntity contains at least one toMany relationship.
 boolean hasToOneDeclaredRelationships()
          Returns true if current ObjEntity contains at least one toOne relationship, ignoring those declared in superentities.
 boolean hasToOneDeclaredRelationships(ObjEntity anObjEntity)
          Returns true if an ObjEntity contains at least one toOne relationship, ignoring those declared in superentities.
 boolean hasToOneRelationships()
          Returns true if current ObjEntity contains at least one toOne relationship.
 boolean hasToOneRelationships(ObjEntity anObjEntity)
          Returns true if an ObjEntity contains at least one toOne relationship.
 boolean isAbstract()
          Returns true if current ObjEntity is defined as abstract.
 boolean isAbstract(ObjEntity anObjEntity)
          Returns true if current ObjEntity is defined as abstract.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subClassName

protected String subClassName

superClassName

protected String superClassName

baseClassName

protected String baseClassName

subPackageName

protected String subPackageName

superPackageName

protected String superPackageName

basePackageName

protected String basePackageName

primaryDataMap

protected DataMap primaryDataMap

objEntity

protected ObjEntity objEntity

callbackNames

protected Collection<String> callbackNames
Constructor Detail

EntityUtils

public EntityUtils(DataMap dataMap,
                   ObjEntity objEntity,
                   String fqnBaseClass,
                   String fqnSuperClass,
                   String fqnSubClass)
Method Detail

getPrimaryDataMap

public DataMap getPrimaryDataMap()
Returns:
Returns the primary DataMap.
Since:
1.2

getEntityResolver

public MappingNamespace getEntityResolver()
Returns the EntityResolver for this set of DataMaps.

Since:
1.2

isAbstract

public boolean isAbstract()
Returns true if current ObjEntity is defined as abstract.


isAbstract

public boolean isAbstract(ObjEntity anObjEntity)
Returns true if current ObjEntity is defined as abstract.


hasToManyRelationships

public boolean hasToManyRelationships()
Returns true if current ObjEntity contains at least one toMany relationship.


hasToManyRelationships

public boolean hasToManyRelationships(ObjEntity anObjEntity)
Returns true if an ObjEntity contains at least one toMany relationship.


hasToManyDeclaredRelationships

public boolean hasToManyDeclaredRelationships()
Returns true if current ObjEntity contains at least one toMany relationship, ignoring those declared in superentities.

Since:
1.2

hasToManyDeclaredRelationships

public boolean hasToManyDeclaredRelationships(ObjEntity anObjEntity)
Returns true if an ObjEntity contains at least one toMany relationship, ignoring those declared in superentities.

Since:
1.2

hasToOneRelationships

public boolean hasToOneRelationships()
Returns true if current ObjEntity contains at least one toOne relationship.


hasToOneRelationships

public boolean hasToOneRelationships(ObjEntity anObjEntity)
Returns true if an ObjEntity contains at least one toOne relationship.


hasToOneDeclaredRelationships

public boolean hasToOneDeclaredRelationships()
Returns true if current ObjEntity contains at least one toOne relationship, ignoring those declared in superentities.


hasToOneDeclaredRelationships

public boolean hasToOneDeclaredRelationships(ObjEntity anObjEntity)
Returns true if an ObjEntity contains at least one toOne relationship, ignoring those declared in superentities.


getMapKeyType

public String getMapKeyType(ObjRelationship relationship)
Returns the map key type for a collection relationship of type java.util.Map.

Parameters:
relationship - The relationship to look up type information for.
Returns:
The type of the attribute keyed on.

getCallbackNames

public Collection<String> getCallbackNames()
Returns:
the list of all callback names registered for the entity.
Since:
3.0


Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.