Package org.hibernate.boot.jaxb.internal
Class XmlSources
- java.lang.Object
-
- org.hibernate.boot.jaxb.internal.XmlSources
-
-
Constructor Summary
Constructors Constructor Description XmlSources()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XmlSource
fromCacheableFile(File file)
static XmlSource
fromCacheableFile(File file, boolean strict)
static XmlSource
fromCacheableFile(File file, File cacheableDir)
static XmlSource
fromCacheableFile(File file, File cacheableDir, boolean strict)
static XmlSource
fromDocument(Document document)
static XmlSource
fromFile(File file)
static void
fromJar(File jar, Consumer<XmlSource> consumer)
Read all.hbm.xml
mappings from a jar file and pass them to the givenConsumer
.static XmlSource
fromResource(String resourceName, ClassLoaderService classLoaderService)
Create anXmlSource
from a named resourcestatic XmlSource
fromStream(InputStream inputStream)
static XmlSource
fromStream(InputStreamAccess inputStreamAccess)
static XmlSource
fromUrl(URL url)
Create anXmlSource
from a URL
-
-
-
Method Detail
-
fromResource
public static XmlSource fromResource(String resourceName, ClassLoaderService classLoaderService)
Create anXmlSource
from a named resource
-
fromCacheableFile
public static XmlSource fromCacheableFile(File file, File cacheableDir, boolean strict)
-
fromStream
public static XmlSource fromStream(InputStreamAccess inputStreamAccess)
-
fromStream
public static XmlSource fromStream(InputStream inputStream)
-
fromJar
public static void fromJar(File jar, Consumer<XmlSource> consumer)
Read all.hbm.xml
mappings from a jar file and pass them to the givenConsumer
.Assumes that any file named
*.hbm.xml
is a mapping document. This method does not supportorm.xml
files!- Parameters:
jar
- a jar fileconsumer
- a consumer of the resulting XML sources
-
-