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 EntityArtifact

    java.lang.Object
      org.apache.cayenne.gen.EntityArtifact

All Implemented Interfaces:
  Artifact

Direct Known Subclasses:
  ClientEntityArtifact

    public class EntityArtifact

extends Object
implements Artifact

`Artifact` facade for an ObjEntity.

Since:
  3.0

Field Summary
`protected ObjEntity` | `entity`
`static String` | `ENTITY_UTILS_KEY`
`static String` | `OBJ_ENTITY_KEY` Deprecated. since 3.0 "OBJECT" should be used instead, as the root key in the template is not necessarily ObjEntity. Still preserved for ObjEntities for backwards compatibility.

Fields inherited from interface org.apache.cayenne.gen.Artifact
`BASE_CLASS_KEY, BASE_PACKAGE_KEY, IMPORT_UTILS_KEY, OBJECT_KEY, STRING_UTILS_KEY, SUB_CLASS_KEY, SUB_PACKAGE_KEY, SUPER_CLASS_KEY, SUPER_PACKAGE_KEY`

Constructor Summary
`EntityArtifact(ObjEntity entity)`

Method Summary
`Object` | `getObject()` Returns ObjEntity.
`String` | `getQualifiedBaseClassName()`
`String` | `getQualifiedClassName()`
`TemplateType` | `getSingleClassType()`
`TemplateType` | `getSubclassType()`
`TemplateType` | `getSuperClassType()`
`TemplateType[]` | `getTemplateTypes(ArtifactGenerationMode mode)`
`void` | `postInitContext(org.apache.velocity.VelocityContext context)` A callback method that allows each artifact to add its own special keys to the context.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OBJ_ENTITY_KEY

    public static String OBJ_ENTITY_KEY

  Deprecated. since 3.0 "OBJECT" should be used instead, as the root key in the template is not necessarily ObjEntity. Still preserved for ObjEntities for backwards compatibility.

### ENTITY_UTILS_KEY

    public static String ENTITY_UTILS_KEY

### entity

    protected ObjEntity entity

Constructor Detail

### EntityArtifact

    public EntityArtifact(ObjEntity entity)

Method Detail

### getObject

    public Object getObject()

  Returns ObjEntity.

  Specified by:
    `getObject` in interface `Artifact`

### getQualifiedBaseClassName

    public String getQualifiedBaseClassName()

  Specified by:
    `getQualifiedBaseClassName` in interface `Artifact`

### getQualifiedClassName

    public String getQualifiedClassName()

  Specified by:
    `getQualifiedClassName` in interface `Artifact`

### getSingleClassType

    public TemplateType getSingleClassType()

### getSubclassType

    public TemplateType getSubclassType()

### getSuperClassType

    public TemplateType getSuperClassType()

### getTemplateTypes

    public TemplateType[] getTemplateTypes(ArtifactGenerationMode mode)

  Specified by:
    `getTemplateTypes` in interface `Artifact`

### postInitContext

    public void postInitContext(org.apache.velocity.VelocityContext context)

  Description copied from interface: `Artifact`
  A callback method that allows each artifact to add its own special keys to the context. Invoked from `ClassGenerationAction.resetContextForArtifactTemplate(Artifact, TemplateType)`, after the context is initialized by code generator, so this method can use predefined keys from the context.

  Specified by:
    `postInitContext` in interface `Artifact`

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.