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.wocompat
Class EOModelProcessor

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

    public class EOModelProcessor

extends Object

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

Field Summary
`protected Predicate` | `prototypeChecker`

Constructor Summary
`EOModelProcessor()`

Method Summary
`protected boolean` | `isPrototypesEntity(String entityName)` Returns whether an Entity is an EOF EOPrototypes entity.
`DataMap` | `loadEOModel(String path)` Performs EOModel loading.
`DataMap` | `loadEOModel(String path, boolean generateClientClass)` Performs EOModel loading.
`Map` | `loadModeIndex(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, 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(String path, boolean genereateClientClass)` Creates an returns new EOModelHelper to process EOModel.
`protected Query` | `makeQuery(EOModelHelper helper, EOObjEntity entity, 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 Predicate prototypeChecker

Constructor Detail

### EOModelProcessor

    public EOModelProcessor()

Method Detail

### loadModeIndex

    public Map loadModeIndex(String path)
                      throws Exception

  Returns index.eomodeld contents as a Map.

  Throws:
    `Exception`
  Since:
    1.1

### loadEOModel

    public DataMap loadEOModel(String path)
                        throws Exception

  Performs EOModel loading.

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

### loadEOModel

    public DataMap loadEOModel(String path,
                               boolean generateClientClass)
                        throws 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:
    `Exception`

### isPrototypesEntity

    protected boolean isPrototypesEntity(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(String path,
                                       boolean genereateClientClass)
                                throws Exception

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

  Throws:
    `Exception`

### makeQuery

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

  Creates a Cayenne query out of EOFetchSpecification data.

  Since:
    1.1

### makeEntity

    protected EOObjEntity makeEntity(EOModelHelper helper,
                                     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 | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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