Package org.hibernate.testing.orm.domain
Interface DomainModelDescriptor
-
- All Known Implementing Classes:
AbstractDomainModelDescriptor
,AnimalDomainModel
,ContactsDomainModel
,GambitDomainModel
,HelpDeskDomainModel
,RetailDomainModel
,UserguideDomainModel
public interface DomainModelDescriptor
Describes a standard domain model
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
applyDomainModel(MetadataSources sources)
Apply the model classes to the given MetadataSourcesClass[]
getAnnotatedClasses()
default EnumSet<MappingFeature>
getMappingFeaturesUsed()
Identifies the specific mapping features this domain model uses.default String
getNamespace()
The namespace to apply the model to.
-
-
-
Method Detail
-
getAnnotatedClasses
Class[] getAnnotatedClasses()
-
applyDomainModel
void applyDomainModel(MetadataSources sources)
Apply the model classes to the given MetadataSources
-
getNamespace
default String getNamespace()
The namespace to apply the model to. This is interpreted as a catalog name or a schema name depending on the capability of the underlying database viaDialect
. Would require a new Dialect method I think, though we could also leverage the driver's db-metadata to ascertain which interpretation to use which would not need any (more) test-specific Dialect feature. Note however that this might be a useful feature as well for users instead of JPA'sTable.catalog()
/Table.schema()
. AKA, something like `@org.hibernate.annotations.Namespace("a_name")` or `@org.hibernate.annotations.Table( namespace="a_name", ... )`. This may benull
indicating that the default namespace should be used. Note that domain models can use the same namespace so long as they do not share db-object (tables, etc) names
-
getMappingFeaturesUsed
default EnumSet<MappingFeature> getMappingFeaturesUsed()
Identifies the specific mapping features this domain model uses.
-
-