org.apache.cayenne.gen
Interface Artifact

All Known Implementing Classes:
ClientEntityArtifact, EmbeddableArtifact, EntityArtifact

public interface Artifact

Represents a class generation "artifact" which is a facade to a metadata object used for a given single generation template run.

Since:
3.0
Author:
Andrus Adamchik

Field Summary
static String BASE_CLASS_KEY
           
static String BASE_PACKAGE_KEY
           
static String IMPORT_UTILS_KEY
           
static String OBJECT_KEY
          Root object, such as ObjEntity or Embeddable, etc.
static String STRING_UTILS_KEY
           
static String SUB_CLASS_KEY
           
static String SUB_PACKAGE_KEY
           
static String SUPER_CLASS_KEY
           
static String SUPER_PACKAGE_KEY
           
 
Method Summary
 Object getObject()
          Returns a mapping metadata object for this artifact.
 String getQualifiedBaseClassName()
           
 String getQualifiedClassName()
           
 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.
 

Field Detail

STRING_UTILS_KEY

static final String STRING_UTILS_KEY
See Also:
Constant Field Values

IMPORT_UTILS_KEY

static final String IMPORT_UTILS_KEY
See Also:
Constant Field Values

OBJECT_KEY

static final String OBJECT_KEY
Root object, such as ObjEntity or Embeddable, etc.

See Also:
Constant Field Values

SUPER_CLASS_KEY

static final String SUPER_CLASS_KEY
See Also:
Constant Field Values

SUPER_PACKAGE_KEY

static final String SUPER_PACKAGE_KEY
See Also:
Constant Field Values

SUB_CLASS_KEY

static final String SUB_CLASS_KEY
See Also:
Constant Field Values

SUB_PACKAGE_KEY

static final String SUB_PACKAGE_KEY
See Also:
Constant Field Values

BASE_CLASS_KEY

static final String BASE_CLASS_KEY
See Also:
Constant Field Values

BASE_PACKAGE_KEY

static final String BASE_PACKAGE_KEY
See Also:
Constant Field Values
Method Detail

getTemplateTypes

TemplateType[] getTemplateTypes(ArtifactGenerationMode mode)

getQualifiedBaseClassName

String getQualifiedBaseClassName()

getQualifiedClassName

String getQualifiedClassName()

getObject

Object getObject()
Returns a mapping metadata object for this artifact.


postInitContext

void postInitContext(org.apache.velocity.VelocityContext context)
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.



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