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
Author:
Mike Kienenberger

Field Summary
protected  String baseClassName
           
protected  String basePackageName
           
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
 String getBaseClassName()
          Returns the base class (without a package) of the data object class associated with this generator.
 String getBasePackageName()
          Returns basePackageName property that defines a baseclass's (superclass superclass) package name.
 MappingNamespace getEntityResolver()
          Returns the EntityResolver for this set of DataMaps.
 DataMap getPrimaryDataMap()
           
 String getSubClassName()
          Returns class name (without a package) of the sub class associated with this generator.
 String getSubPackageName()
          Returns Java package name of the class associated with this generator.
 String getSuperClassName()
          Returns the super class (without a package) of the data object class associated with this generator
 String getSuperPackageName()
          Returns superPackageName property that defines a superclass's package name.
 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.
 
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
Constructor Detail

EntityUtils

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

getSubClassName

public String getSubClassName()
Returns class name (without a package) of the sub class associated with this generator.


getSuperClassName

public String getSuperClassName()
Returns the super class (without a package) of the data object class associated with this generator


getBaseClassName

public String getBaseClassName()
Returns the base class (without a package) of the data object class associated with this generator. Class name must not include a package.


getSubPackageName

public String getSubPackageName()
Returns Java package name of the class associated with this generator.


getSuperPackageName

public String getSuperPackageName()
Returns superPackageName property that defines a superclass's package name.


getBasePackageName

public String getBasePackageName()
Returns basePackageName property that defines a baseclass's (superclass superclass) package name.


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

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.



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