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
Modifier and TypeMethodDescriptionvoidapplyDomainModel(org.hibernate.boot.MetadataSources sources) Apply the model classes to the given MetadataSourcesClass[]default EnumSet<MappingFeature>Identifies the specific mapping features this domain model uses.default StringThe namespace to apply the model to.
-
Method Details
-
getAnnotatedClasses
Class[] getAnnotatedClasses() -
applyDomainModel
void applyDomainModel(org.hibernate.boot.MetadataSources sources) Apply the model classes to the given MetadataSources -
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 benullindicating 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
Identifies the specific mapping features this domain model uses.
-