buildMetadata(), or use getMetadataBuilder() to customize
how sources are processed (naming strategies, etc).
| Modifier and Type | Field and Description |
|---|---|
| private LinkedHashSet | |
| private LinkedHashSet | |
| private LinkedHashSet | |
| private final boolean | |
| private static final CoreMessageLogger | |
| private final ServiceRegistry | |
| private List | |
| private XmlMappingBinderAccess |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MetadataSources(ServiceRegistry
The service registry to use. serviceRegistry)Create a metadata sources using the specified service registry. |
| public | MetadataSources(ServiceRegistry serviceRegistry, boolean disableXmlMappingBinders)
Consider this an SPI, used by Quarkus |
| Modifier and Type | Method and Description |
|---|---|
| public MetadataSources | Returns: this (for method chaining)The class containing annotations annotatedClass)Read metadata from the annotations attached to the given class. |
| public MetadataSources | Returns: this (for method chaining)The name of a class containing annotations annotatedClassName)Read metadata from the annotations attached to the given class. |
| public MetadataSources | Returns: this (for method chaining purposes)The path to a file. Expected to be resolvable by path)java.See |
| private void | |
| public MetadataSources | Returns: this (for method chaining purposes)The cacheable mapping file to be added, file){xmlFile} in above discussion.Add a cached mapping file. |
| public MetadataSources | Returns: The dom "deserialized" from the cached file.The xml file, not the bin! file)INTENDED FOR TESTSUITE USE ONLY! |
| public MetadataSources | Returns: this (for method chaining purposes)The mapped class. Cannot be entityClass)null null.
Deprecated
hbm.xml is a legacy mapping format now considered deprecated.
Read a mapping as an application resource using the convention that a class named foo.bar.Foo is
mapped by a file named foo/bar/Foo.hbm.xml which can be resolved as a classpath resource.
|
| public MetadataSources | Returns: this (for method chaining purposes)The directory dir)Read all mapping documents from a directory tree. |
| public MetadataSources | Returns: this (for method chaining purposes)The DOM document document)
Deprecated
since 5.0. Use one of the other methods for passing mapping source(s).
Read mappings from a DOM org.
|
| public MetadataSources | Returns: this (for method chaining purposes)The path to a file. Expected to be resolvable by path)java.Read mappings from a particular XML file |
| public MetadataSources | |
| public MetadataSources | Returns: this (for method chaining purposes)Access to an input stream containing a DOM. xmlInputStreamAccess)Read metadata from an |
| public MetadataSources | Returns: this (for method chaining purposes)The input stream containing a DOM. xmlInputStream)Read metadata from an |
| public MetadataSources | |
| public MetadataSources | Returns: this (for method chaining)java package name without trailing '.', cannot be packageName)nullRead package-level metadata. |
| public MetadataSources | Returns: this (for method chaining)Java Package reference packageRef)Read package-level metadata. |
| private void | |
| public MetadataSources | Returns: this (for method chaining purposes)The resource name name)Read mappings as an application resourceName (i.e. classpath lookup). |
| public MetadataSources | Returns: this (for method chaining purposes)The url for the mapping document to be read. url)Read mappings from a |
| public MetadataSources | Returns: this (for method chaining purposes)The binding. binding)Add XML mapping bindings created from an arbitrary source by the |
| public Metadata | Returns: The built metadata.Short-hand form of calling |
| public Metadata | |
| public Collection | |
| public Collection | |
| public Collection | |
| private MetadataBuilder | getCustomBuilderOrDefault(MetadataBuilderImpl defaultBuilder)
In case a custom |
| public MetadataBuilder | Returns: The built metadata.Get a builder for metadata where non-default options can be specified. |
| public MetadataBuilder | Returns: The built metadata.
Deprecated
Use
Get a builder for metadata where non-default options can be specified.
getMetadataBuilder() instead
|
| public ServiceRegistry | |
| public List | |
| private <Binding> List | |
| public XmlMappingBinderAccess | |
| protected static boolean |
| annotatedClasses | back to summary |
|---|---|
| private LinkedHashSet<Class<?>> annotatedClasses | |
| annotatedClassNames | back to summary |
|---|---|
| private LinkedHashSet<String> annotatedClassNames | |
| annotatedPackages | back to summary |
|---|---|
| private LinkedHashSet<String> annotatedPackages | |
| disableXmlMappingBinders | back to summary |
|---|---|
| private final boolean disableXmlMappingBinders | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| serviceRegistry | back to summary |
|---|---|
| private final ServiceRegistry serviceRegistry | |
| xmlBindings | back to summary |
|---|---|
| private List<Binding<T>> xmlBindings | |
| xmlMappingBinderAccess | back to summary |
|---|---|
| private XmlMappingBinderAccess xmlMappingBinderAccess | |
| MetadataSources | back to summary |
|---|---|
| public MetadataSources() | |
| MetadataSources | back to summary |
|---|---|
| public MetadataSources(ServiceRegistry serviceRegistry) Create a metadata sources using the specified service registry.
| |
| MetadataSources | back to summary |
|---|---|
| public MetadataSources(ServiceRegistry serviceRegistry, boolean disableXmlMappingBinders) Consider this an SPI, used by Quarkus | |
| addAnnotatedClass | back to summary |
|---|---|
| public MetadataSources addAnnotatedClass(Class<T> annotatedClass) Read metadata from the annotations attached to the given class.
| |
| addAnnotatedClassName | back to summary |
|---|---|
| public MetadataSources addAnnotatedClassName(String annotatedClassName) Read metadata from the annotations attached to the given class. The important
distinction here is that the
| |
| addCacheableFile | back to summary |
|---|---|
| public MetadataSources addCacheableFile(String path) See
| |
| addCacheableFile | back to summary |
|---|---|
| private void addCacheableFile(Origin origin, File file) | |
| addCacheableFile | back to summary |
|---|---|
| public MetadataSources addCacheableFile(File file) Add a cached mapping file. A cached file is a serialized representation of the DOM structure of a
particular mapping. It is saved from a previous call as a file with the name {xmlFile}.bin exists and is newer than {xmlFile}, the {xmlFile}.bin
file will be read directly. Otherwise {xmlFile} is read and then serialized to {xmlFile}.bin for
use the next time.
| |
| addCacheableFileStrictly | back to summary |
|---|---|
| public MetadataSources addCacheableFileStrictly(File file) throws SerializationException, FileNotFoundException INTENDED FOR TESTSUITE USE ONLY!
Much like
| |
| addClass | back to summary |
|---|---|
| public MetadataSources addClass(Class<T> entityClass)
Deprecated hbm.xml is a legacy mapping format now considered deprecated. Read a mapping as an application resource using the convention that a class named
| |
| addDirectory | back to summary |
|---|---|
| public MetadataSources addDirectory(File dir) Read all mapping documents from a directory tree. Assumes that any file named *.hbm.xml is a mapping document.
| |
| addDocument | back to summary |
|---|---|
| public MetadataSources addDocument(Document document)
Deprecated since 5.0. Use one of the other methods for passing mapping source(s). Read mappings from a DOM
| |
| addFile | back to summary |
|---|---|
| public MetadataSources addFile(String path) Read mappings from a particular XML file
| |
| addFile | back to summary |
|---|---|
| public MetadataSources addFile(File file) Read mappings from a particular XML file
| |
| addInputStream | back to summary |
|---|---|
| public MetadataSources addInputStream(InputStreamAccess xmlInputStreamAccess) Read metadata from an
| |
| addInputStream | back to summary |
|---|---|
| public MetadataSources addInputStream(InputStream xmlInputStream) Read metadata from an
| |
| addJar | back to summary |
|---|---|
| public MetadataSources addJar(File jar) Read all mappings from a jar file. Assumes that any file named *.hbm.xml is a mapping document.
| |
| addPackage | back to summary |
|---|---|
| public MetadataSources addPackage(String packageName) Read package-level metadata.
| |
| addPackage | back to summary |
|---|---|
| public MetadataSources addPackage(Package packageRef) Read package-level metadata.
| |
| addPackageInternal | back to summary |
|---|---|
| private void addPackageInternal(String packageName) | |
| addResource | back to summary |
|---|---|
| public MetadataSources addResource(String name) Read mappings as an application resourceName (i.e. classpath lookup).
| |
| addURL | back to summary |
|---|---|
| public MetadataSources addURL(URL url) Read mappings from a
| |
| addXmlBinding | back to summary |
|---|---|
| public MetadataSources addXmlBinding(Binding<?> binding) Add XML mapping bindings created from an arbitrary source by the
| |
| buildMetadata | back to summary |
|---|---|
| public Metadata buildMetadata() Short-hand form of calling
| |
| buildMetadata | back to summary |
|---|---|
| public Metadata buildMetadata(StandardServiceRegistry serviceRegistry) | |
| getAnnotatedClasses | back to summary |
|---|---|
| public Collection | |
| getAnnotatedClassNames | back to summary |
|---|---|
| public Collection | |
| getAnnotatedPackages | back to summary |
|---|---|
| public Collection | |
| getCustomBuilderOrDefault | back to summary |
|---|---|
| private MetadataBuilder getCustomBuilderOrDefault(MetadataBuilderImpl defaultBuilder) In case a custom | |
| getMetadataBuilder | back to summary |
|---|---|
| public MetadataBuilder getMetadataBuilder() Get a builder for metadata where non-default options can be specified.
| |
| getMetadataBuilder | back to summary |
|---|---|
| public MetadataBuilder getMetadataBuilder(StandardServiceRegistry serviceRegistry)
Deprecated Use Get a builder for metadata where non-default options can be specified.
| |
| getServiceRegistry | back to summary |
|---|---|
| public ServiceRegistry getServiceRegistry() | |
| getXmlBindings | back to summary |
|---|---|
| public List | |
| getXmlBindingsForWrite | back to summary |
|---|---|
| private <Binding> List | |
| getXmlMappingBinderAccess | back to summary |
|---|---|
| public XmlMappingBinderAccess getXmlMappingBinderAccess() | |
| isExpectedServiceRegistryType | back to summary |
|---|---|
| protected static boolean isExpectedServiceRegistryType(ServiceRegistry serviceRegistry) | |