Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.gen
Class EntityUtils

    java.lang.Object
      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()` Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.
`String` | `getBasePackageName()` Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.
`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()`
`String` | `getSubClassName()` Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.
`String` | `getSubPackageName()` Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.
`String` | `getSuperClassName()` Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.
`String` | `getSuperPackageName()` Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.
`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()

  Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.

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

### getSuperClassName

    public String getSuperClassName()

  Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.

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

### getBaseClassName

    public String getBaseClassName()

  Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.

  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()

  Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.

  Returns Java package name of the class associated with this generator.

### getSuperPackageName

    public String getSuperPackageName()

  Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.

  Returns `superPackageName` property that defines a superclass's package name.

### getBasePackageName

    public String getBasePackageName()

  Deprecated. since 3.0 This value is a part of velocity context and therefore is redundant here.

  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.

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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