<commit_before><?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC 
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
	<!--

 Copyright 2005 I Serv Consultoria Empresarial Ltda.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
		
	Hibernate mapping
		
		-->
<hibernate-mapping default-lazy="false">
	<class table="core_partner" 
		name="org.helianto.core.Self" 
		discriminator-value="S">
		<!-- 
				SELF
				============================================= 
		-->
		<meta attribute="class-description">
				<![CDATA[
<p>
Represents the organization itself. 
</p>

@author <NAME>
				]]>
        </meta>
		<!-- 
  				id
		-->
		<id name="id" type="long" unsaved-value="null">
			<generator class="native"/>
		</id>
		<discriminator column="role" type="char"/>
		<natural-id>
			<!-- 
	  				entity
			-->
			<many-to-one name="entity" cascade="save-update,merge"
				class="org.helianto.core.Entity">
				<meta attribute="use-in-equals">true</meta>
				<meta attribute="use-in-tostring">true</meta>
				<column name="entityId"/>
			</many-to-one>
			<!-- 
	  				alias
			-->
			<property name="alias" type="string">
				<meta attribute="use-in-equals">true</meta>
				<meta attribute="use-in-tostring">true</meta>
				<column name="alias" length="20"/>
			</property>
		</natural-id>
		<!-- 
  				Partner
		-->
		<subclass name="org.helianto.core.Partner" 
			discriminator-value="P">
			<!-- 
				PARTNER
				============================================= 
			-->
			<meta attribute="class-description" inherit="false">
				<![CDATA[
<p>
Represents a relationship to other entities. 
</p>

@author <NAME>
				]]>
			</meta>
			<!-- 
	  				related to (another entity)
			-->
			<many-to-one name="related"  cascade="save-update,merge"
				class="org.helianto.core.Entity">
				<column name="relId"></column>
			</many-to-one>
			<!-- 
	  				share mode (restricted, full)
			-->
			<property name="shareMode" type="char" not-null="true"/>
			<!-- 
	  				relatedSince
			-->
			<property name="relatedSince" type="date"/>
			<!--
					roles
			-->
			<set name="roles" inverse="true">
				<key column="partnerId"/>
				<one-to-many class="org.helianto.core.PartnerRole"/>
			</set>
		</subclass>
	</class>
</hibernate-mapping>
<commit_msg>refactored after new Partner design<commit_after><?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC 
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
	<!--

 Copyright 2005 I Serv Consultoria Empresarial Ltda.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
		
	Hibernate mapping
		
		-->
<hibernate-mapping default-lazy="false">
	<class table="core_partner" 
		name="org.helianto.core.Partner" 
		discriminator-value="P">
		<!-- 
			PARTNER
			============================================= 
		-->
		<meta attribute="class-description">
				<![CDATA[
<p>
Represents the relationship between the organization and other entities.  
</p>

@author <NAME>
				]]>
        </meta>
		<!-- 
  				id
		-->
		<id name="id" type="long" unsaved-value="null">
			<generator class="native"/>
		</id>
		<discriminator column="role" type="char"/>
		<natural-id>
			<!-- 
	  				entity
			-->
			<many-to-one name="entity" cascade="save-update,merge"
				class="org.helianto.core.Entity">
				<meta attribute="use-in-equals">true</meta>
				<meta attribute="use-in-tostring">true</meta>
				<column name="entityId"/>
			</many-to-one>
			<!-- 
	  				alias
			-->
			<property name="alias" type="string">
				<meta attribute="use-in-equals">true</meta>
				<meta attribute="use-in-tostring">true</meta>
				<column name="alias" length="20"/>
			</property>
		</natural-id>
		<!-- 
  				related to (another entity)
		-->
		<many-to-one name="related"  cascade="save-update,merge"
			class="org.helianto.core.Entity">
			<column name="relId"></column>
		</many-to-one>
		<!-- 
  				share mode (restricted, full)
		-->
		<property name="shareMode" type="char" not-null="true"/>
		<!-- 
  				relatedSince
		-->
		<property name="relatedSince" type="date"/>
		<!--
				roles
		-->
		<set name="roles" inverse="true">
			<key column="partnerId"/>
			<one-to-many class="org.helianto.core.PartnerRole"/>
		</set>
	</class>
</hibernate-mapping>

{'fraction_non_alphanumeric': 0.18419556566230813, 'fraction_numerical': 0.006064051544438127, 'mean_word_length': 3.1298904538341157, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 2, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6000717', 'n_tokens_mistral': 2026, 'n_tokens_neox': 1652, 'n_words': 404}