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

## org.apache.cayenne.wocompat
Class EOModelProcessor

    java.lang.Object
      org.apache.cayenne.wocompat.EOModelProcessor

    public class EOModelProcessor

extends java.lang.Object

Class for converting stored Apple EOModel mapping files to Cayenne DataMaps.

Field Summary
`protected org.apache.commons.collections.Predicate` | `prototypeChecker`

Constructor Summary
`EOModelProcessor()`

Method Summary
`protected boolean` | `isPrototypesEntity(java.lang.String entityName)` Returns whether an Entity is an EOF EOPrototypes entity.
`DataMap` | `loadEOModel(java.lang.String path)` Performs EOModel loading.
`DataMap` | `loadEOModel(java.lang.String path, boolean generateClientClass)` Performs EOModel loading.
`java.util.Map` | `loadModeIndex(java.lang.String path)` Returns index.eomodeld contents as a Map.
`protected void` | `makeAttributes(EOModelHelper helper, EOObjEntity objEntity)` Create ObjAttributes of the specified entity, as well as DbAttributes of the corresponding DbEntity.
`protected EOObjEntity` | `makeEntity(EOModelHelper helper, java.lang.String name, boolean generateClientClass)` Creates and returns a new ObjEntity linked to a corresponding DbEntity.
`protected void` | `makeFlatRelationships(EOModelHelper helper, ObjEntity e)` Create Flattened ObjRelationships of the specified entity.
`protected EOModelHelper` | `makeHelper(java.lang.String path, boolean genereateClientClass)` Creates an returns new EOModelHelper to process EOModel.
`protected Query` | `makeQuery(EOModelHelper helper, EOObjEntity entity, java.lang.String queryName)` Creates a Cayenne query out of EOFetchSpecification data.
`protected void` | `makeRelationships(EOModelHelper helper, ObjEntity objEntity)` Create ObjRelationships of the specified entity, as well as DbRelationships of the corresponding DbEntity.
`protected void` | `makeReverseDbRelationships(DbEntity dbEntity)` Create reverse DbRelationships that were not created so far, since Cayenne requires them.

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

Field Detail

### prototypeChecker

    protected org.apache.commons.collections.Predicate prototypeChecker

Constructor Detail

### EOModelProcessor

    public EOModelProcessor()

Method Detail

### loadModeIndex

    public java.util.Map loadModeIndex(java.lang.String path)
                                throws java.lang.Exception

  Returns index.eomodeld contents as a Map.

  Throws:
    `java.lang.Exception`
  Since:
    1.1

### loadEOModel

    public DataMap loadEOModel(java.lang.String path)
                        throws java.lang.Exception

  Performs EOModel loading.

  Parameters:
    `path` - A path to ".eomodeld" directory. If path doesn't end with ".eomodeld", ".eomodeld" suffix is automatically assumed.
  Throws:
    `java.lang.Exception`

### loadEOModel

    public DataMap loadEOModel(java.lang.String path,
                               boolean generateClientClass)
                        throws java.lang.Exception

  Performs EOModel loading.

  Parameters:
    `path` - A path to ".eomodeld" directory. If path doesn't end with ".eomodeld", ".eomodeld" suffix is automatically assumed.
    `generateClientClass` - if true then loading of EOModel is java client classes aware and the following processing will work with Java client class settings of the EOModel.
  Throws:
    `java.lang.Exception`

### isPrototypesEntity

    protected boolean isPrototypesEntity(java.lang.String entityName)

  Returns whether an Entity is an EOF EOPrototypes entity. According to EOF conventions EOPrototypes and EO[Adapter]Prototypes entities are considered to be prototypes.

  Since:
    1.1

### makeHelper

    protected EOModelHelper makeHelper(java.lang.String path,
                                       boolean genereateClientClass)
                                throws java.lang.Exception

  Creates an returns new EOModelHelper to process EOModel. Exists mostly for the benefit of subclasses.

  Throws:
    `java.lang.Exception`

### makeQuery

    protected Query makeQuery(EOModelHelper helper,
                              EOObjEntity entity,
                              java.lang.String queryName)

  Creates a Cayenne query out of EOFetchSpecification data.

  Since:
    1.1

### makeEntity

    protected EOObjEntity makeEntity(EOModelHelper helper,
                                     java.lang.String name,
                                     boolean generateClientClass)

  Creates and returns a new ObjEntity linked to a corresponding DbEntity.

### makeAttributes

    protected void makeAttributes(EOModelHelper helper,
                                  EOObjEntity objEntity)

  Create ObjAttributes of the specified entity, as well as DbAttributes of the corresponding DbEntity.

### makeRelationships

    protected void makeRelationships(EOModelHelper helper,
                                     ObjEntity objEntity)

  Create ObjRelationships of the specified entity, as well as DbRelationships of the corresponding DbEntity.

### makeReverseDbRelationships

    protected void makeReverseDbRelationships(DbEntity dbEntity)

  Create reverse DbRelationships that were not created so far, since Cayenne requires them.

  Since:
    1.0.5

### makeFlatRelationships

    protected void makeFlatRelationships(EOModelHelper helper,
                                         ObjEntity e)

  Create Flattened ObjRelationships of the specified entity.

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

Copyright © 2001-2006 Apache.org All Rights Reserved.