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.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:
  Andrus Adamchik

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

Field Summary
`protected Map<String,String>` | `dataViewLocations`
`protected Map<String,PartialProject.DomainMetaData>` | `domains`
`protected ConfigLoaderDelegate` | `loadDelegate`
`protected String` | `projectVersion`

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

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

Method Summary
`List` | `buildFileList()` Creates a list of project files.
`void` | `checkForUpgrades()` Determines whether the project needs to be upgraded.
`List` | `getChildren()` Returns a list of first-level children of the project.
`ConfigStatus` | `getLoadStatus()`
`protected void` | `postInitialize(File projectFile)` Finished project initialization.
`protected void` | `prepareSave(List filesToSave, List wrappedObjects)`
`ProjectFile` | `projectFileForObject(Object obj)`
`void` | `updateNodes(List<? extends DataNodeConfigInfo> 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, 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 String projectVersion

### domains

    protected Map<String,PartialProject.DomainMetaData> domains

### loadDelegate

    protected ConfigLoaderDelegate loadDelegate

### dataViewLocations

    protected Map<String,String> dataViewLocations

Constructor Detail

### PartialProject

    public PartialProject(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(List<? extends DataNodeConfigInfo> 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(List filesToSave,
                               List wrappedObjects)
                        throws ProjectException

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

### postInitialize

    protected void postInitialize(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 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 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(Object obj)

  Specified by:
    `projectFileForObject` in class `Project`

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.