<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="fenaseg.rns.bo.EventoSinistroApolice"
table="EVENTO_SINISTRO_APOLICE"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="EVENTO_SINISTRO_APOLICE"
</meta>
<composite-id>
<meta attribute="class-description" inherit="false">
@hibernate.id
generator-class="assigned"
</meta>
<key-property
name="idEvento"
column="ID_EVENTO"
type="java.lang.Integer"
length="6"
>
<meta attribute="field-description">
@hibernate.property
column="ID_EVENTO"
length="6"
</meta>
</key-property>
<!-- bi-directional many-to-one association to ContratoSeguroVeiculo -->
<key-many-to-one
name="contratoSeguroVeiculo"
class="fenaseg.rns.bo.ContratoSeguroVeiculo"
>
<meta attribute="field-description">
@hibernate.many-to-one
column="FK_ID_CONTRATO_VEICULO_EVENTO""
</meta>
<meta attribute="field-description">
@hibernate.many-to-one
column="FK_ID_SEGURADORA_CONTRATO""
</meta>
<column name="FK_ID_CONTRATO_VEICULO_EVENTO" />
<column name="FK_ID_SEGURADORA_CONTRATO" />
</key-many-to-one>
</composite-id>
<property
name="dtOcorrencia"
type="java.sql.Timestamp"
column="DT_OCORRENCIA"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="DT_OCORRENCIA"
length="7"
</meta>
</property>
<property
name="dtCadast"
type="java.sql.Timestamp"
column="DT_CADAST"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="DT_CADAST"
length="7"
</meta>
</property>
<property
name="dtAviso"
type="java.sql.Timestamp"
column="DT_AVISO"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="DT_AVISO"
length="7"
</meta>
</property>
<property
name="dtFechamentoEvento"
type="java.sql.Timestamp"
column="DT_FECHAMENTO_EVENTO"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="DT_FECHAMENTO_EVENTO"
length="7"
</meta>
</property>
<property
name="dtCancel"
type="java.sql.Timestamp"
column="DT_CANCEL"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="DT_CANCEL"
length="7"
</meta>
</property>
<property
name="stOrigem"
type="java.lang.String"
column="ST_ORIGEM"
not-null="true"
length="1"
>
<meta attribute="field-description">
@hibernate.property
column="ST_ORIGEM"
length="1"
not-null="true"
</meta>
</property>
<!-- associations -->
<!-- bi-directional one-to-many association to ItemSinistroVeiculo -->
<set
name="itemSinistroVeiculos"
lazy="false"
inverse="true"
>
<meta attribute="field-description">
@hibernate.set
lazy="true"
inverse="true"
@hibernate.collection-key
column="FK_ID_EVENTO_VEICULO"
@hibernate.collection-key
column="FK_ID_CONTRATO_VEICULO_EVENTO"
@hibernate.collection-key
column="FK_ID_SEGURADORA_CONTRATO"
@hibernate.collection-one-to-many
class="fenaseg.rns.bo.ItemSinistroVeiculo"
</meta>
<key>
<column name="FK_ID_EVENTO_VEICULO" />
<column name="FK_ID_CONTRATO_VEICULO_EVENTO" />
<column name="FK_ID_SEGURADORA_CONTRATO" />
</key>
<one-to-many
class="fenaseg.rns.bo.ItemSinistroVeiculo"
/>
</set>
<!-- uni-directional one-to-one association to EventoSinistroApolice -->
<many-to-one
name="eventoSinistroApolice"
class="fenaseg.rns.bo.EventoSinistroApolice"
>
<meta attribute="field-description">
@hibernate.many-to-one
@hibernate.column name="FK_ID_EVENTO_ALT"
@hibernate.column name="FK_ID_CONTRATO_VEIC_EV_ALT"
@hibernate.column name="FK_ID_SEGURADORA_CTO_EV_ALT"
</meta>
<column name="FK_ID_EVENTO_ALT" />
<column name="FK_ID_CONTRATO_VEIC_EV_ALT" />
<column name="FK_ID_SEGURADORA_CTO_EV_ALT" />
</many-to-one>
<!-- bi-directional many-to-one association to Operador -->
<many-to-one
name="operador"
class="fenaseg.rns.bo.Operador"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="FK_ID_OPERADOR"
@hibernate.column name="FK_ID_SEGURADORA_OPERADOR"
</meta>
<column name="FK_ID_OPERADOR" />
<column name="FK_ID_SEGURADORA_OPERADOR" />
</many-to-one>
<!-- bi-directional many-to-one association to ItemContratoFrota -->
<many-to-one
name="itemContratoFrota"
class="fenaseg.rns.bo.ItemContratoFrota"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="FK_ID_ITEM_CONTRATO_FROTA"
@hibernate.column name="FK_ID_CONTRATO_FROTA"
@hibernate.column name="FK_ID_SEGURADORA_CTO_FROTA"
@hibernate.column name="FK_ID_VEICULO_FROTA"
</meta>
<column name="FK_ID_ITEM_CONTRATO_FROTA" />
<column name="FK_ID_CONTRATO_FROTA" />
<column name="FK_ID_SEGURADORA_CTO_FROTA" />
<column name="FK_ID_VEICULO_FROTA" />
</many-to-one>
<joined-subclass name="fenaseg.rns.bo.LocalEvento" table="LOCAL_EVENTO">
<key>
<column name="FK_ID_EVENTO" />
<column name="FK_ID_CONTRATO_VEICULO_EVENTO" />
<column name="FK_ID_SEGURADORA_CONTRATO" />
</key>
<property
name="nuCep"
type="java.lang.Integer"
column="NU_CEP"
length="9"
>
<meta attribute="field-description">
@hibernate.property
column="NU_CEP"
length="9"
</meta>
</property>
<property
name="dtBoletimOcorrencia"
type="java.sql.Timestamp"
column="DT_BOLETIM_OCORRENCIA"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="DT_BOLETIM_OCORRENCIA"
length="7"
</meta>
</property>
<property
name="stOrigemLocalEvento"
type="java.lang.String"
column="ST_ORIGEM"
not-null="true"
length="1"
>
<meta attribute="field-description">
@hibernate.property
column="ST_ORIGEM"
length="1"
not-null="true"
</meta>
</property>
<!-- associations -->
<!-- bi-directional many-to-one association to Delegacia -->
<many-to-one
name="delegacia"
class="fenaseg.rns.bo.Delegacia"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="FK_ID_DELEGACIA"
</meta>
<column name="FK_ID_DELEGACIA" />
</many-to-one>
<!-- bi-directional many-to-one association to Municipio -->
<many-to-one
name="municipio"
class="fenaseg.rns.bo.Municipio"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="FK_ID_MUNICIPIO"
@hibernate.column name="FK_ID_UF_MUNICIPIO"
</meta>
<column name="FK_ID_MUNICIPIO" />
<column name="FK_ID_UF_MUNICIPIO" />
</many-to-one>
<!-- bi-directional many-to-one association to TipoLocal -->
<many-to-one
name="tipoLocal"
class="fenaseg.rns.bo.TipoLocal"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="FK_ID_TP_LOCAL"
</meta>
<column name="FK_ID_TP_LOCAL" />
</many-to-one>
<!-- bi-directional many-to-one association to UF -->
<many-to-one
name="uf"
class="fenaseg.rns.bo.Uf"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="FK_ID_UF"
</meta>
<column name="FK_ID_UF" />
</many-to-one>
</joined-subclass>
</class>
</hibernate-mapping>