Class PersistenceXml


  • public class PersistenceXml
    extends java.lang.Object
    To work with the persistence.xml to be used in this application.

    Since:
    4.7
    Author:
    Javier Paniza
    • Constructor Summary

      Constructors 
      Constructor Description
      PersistenceXml()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Collection<java.lang.String> getClasses​(java.lang.String persistenceUnit)  
      static java.lang.String getPropetyValue​(java.lang.String persistenceUnit, java.lang.String propertyName)  
      static java.net.URL getResource()
      Returns the URL of the persistence.xml to be used in this application.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PersistenceXml

        public PersistenceXml()
    • Method Detail

      • getResource

        public static java.net.URL getResource()
                                        throws java.io.IOException
        Returns the URL of the persistence.xml to be used in this application.

        Throws:
        java.io.IOException
      • getPropetyValue

        public static java.lang.String getPropetyValue​(java.lang.String persistenceUnit,
                                                       java.lang.String propertyName)
                                                throws javax.xml.parsers.ParserConfigurationException
        Throws:
        javax.xml.parsers.ParserConfigurationException
        Since:
        6.1.1
      • getClasses

        public static java.util.Collection<java.lang.String> getClasses​(java.lang.String persistenceUnit)
                                                                 throws javax.xml.parsers.ParserConfigurationException
        Throws:
        javax.xml.parsers.ParserConfigurationException
        Since:
        7.0