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 DataNodeFile

    java.lang.Object
      org.apache.cayenne.project.ProjectFile
          org.apache.cayenne.project.DataNodeFile

    public class DataNodeFile

extends ProjectFile

DataNodeFile is a ProjectFile abstraction of the DataNode file in a Cayenne project.

Author:
  Andrei Adamchik

Field Summary
`static java.lang.String` | `LOCATION_SUFFIX`
`protected DataNode` | `nodeObj`

Fields inherited from class org.apache.cayenne.project.ProjectFile
`location, projectObj, tempFile`

Constructor Summary
`DataNodeFile()`
`DataNodeFile(Project project, DataNode node)` Constructor for DataNodeFile.

Method Summary
`boolean` | `canHandle(java.lang.Object obj)` Returns true if this file wrapper can handle a specified object.
`java.lang.String` | `getLocationSuffix()` Returns ".driver.xml" that should be used as a file suffix for DataNode driver files.
`java.lang.Object` | `getObject()` Returns a project object associated with this file.
`java.lang.String` | `getObjectName()` Returns a name of associated object, that is also used as a file name.
`void` | `save(java.io.PrintWriter out)` Saves an underlying object to the file.
`void` | `willSave()` Updates node location to match the name before save.

Methods inherited from class org.apache.cayenne.project.ProjectFile
`canHandleObject, checkWritePermissions, getLocation, getOldLocation, getProject, isRenamed, resolveFile, resolveOldFile, saveCommit, saveTemp, saveUndo, synchronizeLocation, tempFileForFile, toString`

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

Field Detail

### LOCATION_SUFFIX

    public static final java.lang.String LOCATION_SUFFIX

See Also:
  Constant Field Values

### nodeObj

    protected DataNode nodeObj

Constructor Detail

### DataNodeFile

    public DataNodeFile()

### DataNodeFile

    public DataNodeFile(Project project,
                        DataNode node)

  Constructor for DataNodeFile.

Method Detail

### getObject

    public java.lang.Object getObject()

  Description copied from class: `ProjectFile`
  Returns a project object associated with this file.

  Specified by:
    `getObject` in class `ProjectFile`
  See Also:
    `ProjectFile.getObject()`

### getObjectName

    public java.lang.String getObjectName()

  Description copied from class: `ProjectFile`
  Returns a name of associated object, that is also used as a file name.

  Specified by:
    `getObjectName` in class `ProjectFile`
  See Also:
    `ProjectFile.getObjectName()`

### save

    public void save(java.io.PrintWriter out)
              throws java.lang.Exception

  Description copied from class: `ProjectFile`
  Saves an underlying object to the file. The procedure is dependent on the type of object and is implemented by concrete subclasses.

  Specified by:
    `save` in class `ProjectFile`
  Throws:
    `java.lang.Exception`

### canHandle

    public boolean canHandle(java.lang.Object obj)

  Description copied from class: `ProjectFile`
  Returns true if this file wrapper can handle a specified object.

  Specified by:
    `canHandle` in class `ProjectFile`
  See Also:
    `ProjectFile.canHandle(Object)`

### willSave

    public void willSave()

  Updates node location to match the name before save.

  Overrides:
    `willSave` in class `ProjectFile`

### getLocationSuffix

    public java.lang.String getLocationSuffix()

  Returns ".driver.xml" that should be used as a file suffix for DataNode driver files.

  Overrides:
    `getLocationSuffix` in class `ProjectFile`

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.