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.project
Class PartialProject

    java.lang.Object
      org.apache.cayenne.project.Project
          org.apache.cayenne.project.PartialProject

    public class PartialProject

extends Project

PartialProject is a "lightweight" project implementation. It can work with projects even when some of the resources are missing. It never instantiates Cayenne stack objects, using other, lightweight, data structures instead.

Author:
  Andrei Adamchik

Nested Class Summary
`protected class` | `PartialProject.DomainMetaData`
`protected class` | `PartialProject.MapMetaData`
`protected class` | `PartialProject.NodeMetaData`

Field Summary
`protected java.util.Map` | `dataViewLocations`
`protected java.util.Map` | `domains`
`protected ConfigLoaderDelegate` | `loadDelegate`
`protected java.lang.String` | `projectVersion`

Fields inherited from class org.apache.cayenne.project.Project
`CURRENT_PROJECT_VERSION, files, modified, projectDir, upgradeMessages, upgradeStatus`

Constructor Summary
`PartialProject(java.io.File projectFile)` Constructor PartialProjectHandler.

Method Summary
`java.util.List` | `buildFileList()` Creates a list of project files.
`void` | `checkForUpgrades()` Determines whether the project needs to be upgraded.
`java.util.List` | `getChildren()` Returns a list of first-level children of the project.
`ConfigStatus` | `getLoadStatus()`
`protected void` | `postInitialize(java.io.File projectFile)` Finished project initialization.
`protected void` | `prepareSave(java.util.List filesToSave, java.util.List wrappedObjects)`
`ProjectFile` | `projectFileForObject(java.lang.Object obj)`
`void` | `updateNodes(java.util.List list)` Loads internal project and rewrites its nodes according to the list of DataNodeConfigInfo objects.
`void` | `upgrade()`

Methods inherited from class org.apache.cayenne.project.Project
`createProject, deleteFile, findFile, getMainFile, getProjectDirectory, getUpgradeMessages, getUpgradeStatus, getValidator, hasRenamedFiles, initialize, isLocationUndefined, isModified, isUpgradeNeeded, processDelete, processSave, resolveFile, resolveSymbolicName, save, setModified, setProjectDirectory, treeNodes`

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

Field Detail

### projectVersion

    protected java.lang.String projectVersion

### domains

    protected java.util.Map domains

### loadDelegate

    protected ConfigLoaderDelegate loadDelegate

### dataViewLocations

    protected java.util.Map dataViewLocations

Constructor Detail

### PartialProject

    public PartialProject(java.io.File projectFile)

  Constructor PartialProjectHandler.

  Parameters:
    `projectFile` -

Method Detail

### upgrade

    public void upgrade()
                 throws ProjectException

  Specified by:
    `upgrade` in class `Project`
  Throws:
    `ProjectException`
  Since:
    1.1

### updateNodes

    public void updateNodes(java.util.List list)
                     throws ProjectException

  Loads internal project and rewrites its nodes according to the list of DataNodeConfigInfo objects. Only main project file gets updated, the rest are assumed to be in place.

  Throws:
    `ProjectException`

### prepareSave

    protected void prepareSave(java.util.List filesToSave,
                               java.util.List wrappedObjects)
                        throws ProjectException

  Overrides:
    `prepareSave` in class `Project`
  Throws:
    `ProjectException`

### postInitialize

    protected void postInitialize(java.io.File projectFile)

  Description copied from class: `Project`
  Finished project initialization. Called from constructor. Default implementation builds a file list and checks for upgrades.

  Overrides:
    `postInitialize` in class `Project`

### getChildren

    public java.util.List getChildren()

  Description copied from class: `Project`
  Returns a list of first-level children of the project.

  Specified by:
    `getChildren` in class `Project`

### checkForUpgrades

    public void checkForUpgrades()

  Description copied from class: `Project`
  Determines whether the project needs to be upgraded. Populates internal list of upgrade messages with discovered information.

  Specified by:
    `checkForUpgrades` in class `Project`

### buildFileList

    public java.util.List buildFileList()

  Description copied from class: `Project`
  Creates a list of project files.

  Overrides:
    `buildFileList` in class `Project`
  See Also:
    `Project.buildFileList()`

### getLoadStatus

    public ConfigStatus getLoadStatus()

  Specified by:
    `getLoadStatus` in class `Project`
  Returns:
    An object describing failures in the loaded project.
  See Also:
    `Project.getLoadStatus()`

### projectFileForObject

    public ProjectFile projectFileForObject(java.lang.Object obj)

  Specified by:
    `projectFileForObject` in class `Project`

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.