Skip to content

Commit

Permalink
refactor: remove deprecated hibernate structures/functions
Browse files Browse the repository at this point in the history
identifiers.hbm.xml -> identifiers.orm.xml(transform)

Refs: XRDDEV-2713
  • Loading branch information
ovidijusnortal committed Nov 18, 2024
1 parent 70cfcc6 commit 09e160a
Showing 1 changed file with 63 additions and 53 deletions.
116 changes: 63 additions & 53 deletions src/serverconf/src/main/resources/identifiers.orm.xml
Original file line number Diff line number Diff line change
@@ -1,53 +1,63 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="ee.ria.xroad.common.identifier">

<class name="XRoadId$Conf" table="IDENTIFIER">
<id name="id" type="long" access="field">
<generator class="native"/>
</id>

<discriminator column="DISCRIMINATOR" type="string"/>

<property name="type" access="field">
<type name="org.hibernate.type.EnumType">
<param name="enumClass">ee.ria.xroad.common.identifier.XRoadObjectType</param>
<param name="type">12</param>
</type>
</property>

<property name="xRoadInstance" access="field"/>

<subclass name="ClientId$Conf" discriminator-value="C">
<property name="memberClass" access="field"/>
<property name="memberCode" access="field"/>
<property name="subsystemCode" access="field"/>
</subclass>

<subclass name="ServiceId$Conf" discriminator-value="S">
<property name="memberClass" access="field"/>
<property name="memberCode" access="field"/>
<property name="serviceVersion" access="field"/>
<property name="subsystemCode" access="field"/>
<property name="serviceCode" access="field"/>
</subclass>

<subclass name="GlobalGroupId$Conf" discriminator-value="GG">
<property name="groupCode" access="field"/>
</subclass>

<subclass name="LocalGroupId$Conf" discriminator-value="LG">
<property name="groupCode" access="field"/>
</subclass>

<subclass name="SecurityServerId$Conf" discriminator-value="SS">
<property name="memberClass" access="field"/>
<property name="memberCode" access="field"/>
<property name="serverCode" access="field"/>
</subclass>

</class>

</hibernate-mapping>
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_2_2.xsd"
version="2.2">
<package>ee.ria.xroad.common.identifier</package>
<mapped-superclass class="AbstractGroupId$Conf" access="FIELD">
<attributes>
<basic name="groupCode" access="FIELD"/>
</attributes>
</mapped-superclass>
<entity class="XRoadId$Conf" access="FIELD">

<table name="IDENTIFIER"/>
<inheritance strategy="SINGLE_TABLE"/>
<discriminator-column name="DISCRIMINATOR" discriminator-type="STRING"/>
<attributes>
<id name="id" access="FIELD">
<column name="id"/>
<generated-value strategy="AUTO"/>
</id>
<basic name="type" access="FIELD">
<enumerated>STRING</enumerated>
</basic>
<basic name="xRoadInstance" access="FIELD" />
</attributes>
</entity>
<entity class="ClientId$Conf" name="ClientConf">
<discriminator-value>C</discriminator-value>

<attributes>
<basic name="memberClass" access="FIELD"/>
<basic name="memberCode" access="FIELD"/>
<basic name="subsystemCode" access="FIELD"/>
</attributes>
</entity>
<entity class="ServiceId$Conf" name="ServiceIdConf">
<discriminator-value>S</discriminator-value>
<attributes>
<basic name="memberClass" access="FIELD"/>
<basic name="memberCode" access="FIELD"/>
<basic name="serviceVersion" access="FIELD"/>
<basic name="subsystemCode" access="FIELD"/>
<basic name="serviceCode" access="FIELD"/>
</attributes>
</entity>
<entity class="GlobalGroupId$Conf" name="GlobalGroupConf">
<discriminator-value>GG</discriminator-value>
</entity>
<entity class="LocalGroupId$Conf" name="LocalGroupConf">
<discriminator-value>LG</discriminator-value>
</entity>
<entity class="SecurityServerId$Conf" name="SecurityServerIdConf">
<discriminator-value>SS</discriminator-value>
<attributes>
<basic name="memberClass" access="FIELD"/>
<basic name="memberCode" access="FIELD"/>
<basic name="serverCode" access="FIELD"/>
</attributes>
</entity>

</entity-mappings>

0 comments on commit 09e160a

Please sign in to comment.