org.netbeans.modules.j2ee.persistenceapi/1 1.0.20

org.netbeans.modules.j2ee.persistence.api
Class PersistenceScope

java.lang.Object
  extended by org.netbeans.modules.j2ee.persistence.api.PersistenceScope

public final class PersistenceScope
extends Object

Describes a persistence scope. A persistence scope is composed of a persistence.xml file and the classpath for this persistence.xml file (which contains all entity classes and JAR files referenced by the persistence units in the persistence.xml file).


Method Summary
 org.netbeans.api.java.classpath.ClassPath getClassPath()
          Provides the classpath of this persistence scope, which covers the sources of the entity classes referenced by the persistence.xml file, as well as the referenced JAR files.
static PersistenceScope getPersistenceScope(org.openide.filesystems.FileObject fo)
          Returns the persistence scope for the given file.
 org.openide.filesystems.FileObject getPersistenceXml()
          Returns the persistence.xml file of this persistence scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPersistenceScope

public static PersistenceScope getPersistenceScope(org.openide.filesystems.FileObject fo)
Returns the persistence scope for the given file.

Parameters:
fo - the file for which to find the persistence scope; cannot be null.
Returns:
the persistence scope for the given file or null if there is no persistence scope.
Throws:
NullPointerException - if the fo parameter was null.

getPersistenceXml

public org.openide.filesystems.FileObject getPersistenceXml()
Returns the persistence.xml file of this persistence scope.

Returns:
the persistence.xml file or null if it the persistence.xml file does not exist.

getClassPath

public org.netbeans.api.java.classpath.ClassPath getClassPath()
Provides the classpath of this persistence scope, which covers the sources of the entity classes referenced by the persistence.xml file, as well as the referenced JAR files.

Returns:
the persistence scope classpath; never null.

org.netbeans.modules.j2ee.persistenceapi/1 1.0.20

Built on August 9 2006.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.