Skip to content

Commit

Permalink
HHH-17377 - Migrate to JPA 3.2
Browse files Browse the repository at this point in the history
https://hibernate.atlassian.net/browse/HHH-17377

XJB changes (JAXB "binding model")
  • Loading branch information
mbladel authored and sebersole committed Nov 20, 2023
1 parent be8e8b2 commit 6bd1328
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public interface JaxbPluralAttribute extends JaxbPersistentAttribute, JaxbLockab
JaxbPluralFetchModeImpl getFetchMode();
void setFetchMode(JaxbPluralFetchModeImpl mode);

JaxbCollectionUserTypeImpl getCollectionType();
void setCollectionType(JaxbCollectionUserTypeImpl value);

JaxbCollectionIdImpl getCollectionId();
void setCollectionId(JaxbCollectionIdImpl id);

Expand All @@ -38,6 +41,9 @@ public interface JaxbPluralAttribute extends JaxbPersistentAttribute, JaxbLockab
String getSort();
void setSort(String value);

JaxbPluralAnyMappingImpl.JaxbSortNaturalImpl getSortNatural();
void setSortNatural(JaxbPluralAnyMappingImpl.JaxbSortNaturalImpl value);

JaxbMapKeyImpl getMapKey();
void setMapKey(JaxbMapKeyImpl value);

Expand Down Expand Up @@ -66,6 +72,21 @@ public interface JaxbPluralAttribute extends JaxbPersistentAttribute, JaxbLockab

void setMapKeyForeignKey(JaxbForeignKeyImpl value);

String getSqlRestriction();
void setSqlRestriction(String sqlRestriction);

JaxbCustomSqlImpl getSqlInsert();
void setSqlInsert(JaxbCustomSqlImpl sqlInsert);

JaxbCustomSqlImpl getSqlUpdate();
void setSqlUpdate(JaxbCustomSqlImpl sqlUpdate);

JaxbCustomSqlImpl getSqlDelete();
void setSqlDelete(JaxbCustomSqlImpl sqlDelete);

JaxbCustomSqlImpl getSqlDeleteAll();
void setSqlDeleteAll(JaxbCustomSqlImpl sqlDeleteAll);

List<JaxbHbmFilterImpl> getFilters();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -986,13 +986,6 @@
</xsd:sequence>
</xsd:choice>
<xsd:element name="collection-table" type="orm:collection-table" minOccurs="0"/>
<xsd:element name="sql-restriction" type="xsd:string" minOccurs="0"/>
<xsd:element name="sql-insert" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-update" type="orm:custom-sql" minOccurs="0"/>
<!-- todo : sql-delete is currently ignored in ORM for element collections, should we leave it? -->
<xsd:element name="sql-delete" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete-all" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="filter" type="orm:hbm-filter" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="target-class" type="xsd:string"/>
Expand Down Expand Up @@ -1579,13 +1572,6 @@

<xsd:element name="cascade" type="orm:cascade-type"
minOccurs="0"/>

<xsd:element name="sql-restriction" type="xsd:string" minOccurs="0"/>
<xsd:element name="sql-insert" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-update" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete-all" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="filter" type="orm:hbm-filter" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="target-entity" type="xsd:string"/>
Expand Down Expand Up @@ -2012,12 +1998,6 @@
<xsd:element name="cascade" type="orm:cascade-type"
minOccurs="0"/>
<xsd:element name="on-delete" type="orm:on-delete-type" minOccurs="0"/>
<xsd:element name="sql-restriction" type="xsd:string" minOccurs="0"/>
<xsd:element name="sql-insert" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-update" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete-all" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="filter" type="orm:hbm-filter" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="target-entity" type="xsd:string"/>
Expand Down Expand Up @@ -3144,12 +3124,6 @@
<xsd:element name="discriminator" type="orm:any-discriminator"/>
<xsd:element name="key" type="orm:any-key"/>
<xsd:element name="cascade" type="orm:cascade-type" minOccurs="0"/>
<xsd:element name="sql-restriction" type="xsd:string" minOccurs="0"/>
<xsd:element name="sql-insert" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-update" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete-all" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="filter" type="orm:hbm-filter" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>

<xsd:attribute name="name" use="required" type="xsd:string"/>
Expand Down Expand Up @@ -3258,6 +3232,15 @@
</xsd:choice>
</xsd:sequence>
</xsd:choice>

<xsd:element name="sql-restriction" type="xsd:string" minOccurs="0"/>

<xsd:element name="sql-insert" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-update" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete" type="orm:custom-sql" minOccurs="0"/>
<xsd:element name="sql-delete-all" type="orm:custom-sql" minOccurs="0"/>

<xsd:element name="filter" type="orm:hbm-filter" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:group>

Expand Down
15 changes: 3 additions & 12 deletions hibernate-core/src/main/xjb/mapping-bindings.xjb
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,6 @@
<bindings node="//xsd:complexType[@name='element-collection']">
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbBasicMapping</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
</bindings>

<bindings node="//xsd:complexType[@name='one-to-many']">
Expand All @@ -349,9 +346,6 @@
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbNotFoundCapable</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableCapable</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<bindings node=".//xsd:element[@name='filter-join-table']">
<property name="joinTableFilters"/>
</bindings>
Expand All @@ -363,9 +357,6 @@
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbNotFoundCapable</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAssociationAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableCapable</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<bindings node=".//xsd:element[@name='filter-join-table']">
<property name="joinTableFilters"/>
</bindings>
Expand All @@ -375,9 +366,6 @@
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbPluralAttribute</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbAnyMapping</inheritance:implements>
<inheritance:implements>org.hibernate.boot.jaxb.mapping.spi.JaxbCascadableAttribute</inheritance:implements>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
<class name="JaxbPluralAnyMappingImpl"/>
</bindings>

Expand Down Expand Up @@ -452,6 +440,9 @@
<bindings node=".//xsd:element[@name='map-key-join-column']">
<property name="mapKeyJoinColumns"/>
</bindings>
<bindings node=".//xsd:element[@name='filter']">
<property name="filters"/>
</bindings>
</bindings>

<bindings node="//xsd:complexType[@name='element-collection']">
Expand Down

0 comments on commit 6bd1328

Please sign in to comment.