org.apache.aries.jpa.container.parsing
Interface PersistenceDescriptor


public interface PersistenceDescriptor

This is a utility interface that is used by the PersistenceDescriptorParser. This interfaces provides access to a single InputStream that returns the bytes of the persistence descriptor, and a String denoting the location of the persistence descriptor as present in the persistence bundle's Meta-Persistence header.


Method Summary
 InputStream getInputStream()
          Get an InputStream to the persistence descriptor.
 String getLocation()
          Get the location of the persistence descriptor as it appears in the Meta-Persistence header.
 

Method Detail

getLocation

String getLocation()
Get the location of the persistence descriptor as it appears in the Meta-Persistence header. The default location should be returned as "META-INF/persistence.xml".

Returns:
the location

getInputStream

InputStream getInputStream()
Get an InputStream to the persistence descriptor. This method need not return a new InputStream each time, and it is undefined for multiple clients to attempt to use the InputStream from this PersistenceDescriptor. It is also undefined for a client to try to retrieve multiple InputStream objects from this method.

Returns:
An InputStream to the persistence descriptor.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.