|
Spring Framework example source code file (org.springframework.samples.petclinic.Pet.xml)
The Spring Framework org.springframework.samples.petclinic.Pet.xml source code<?xml version="1.0" encoding="UTF-8"?> <descriptor type="relational"> <name>org.springframework.samples.petclinic.Pet <class-handle> <type-name>org.springframework.samples.petclinic.Pet </class-handle> <transactional-policy type="relational"> <descriptor-alias>Pet <refresh-cache-policy/> <caching-policy/> <query-manager type="relational"/> <locking-policy type="relational"/> <primary-key-policy> <primary-key-handles> <column-handle> <column-table-name>PETS <column-name>ID </column-handle> </primary-key-handles> </primary-key-policy> </transactional-policy> <mappings> <mapping type="direct-to-field"> <name>birthDate <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.Pet <attribute-name>birthDate </attribute-handle> <column-handle> <column-table-name>PETS <column-name>BIRTH_DATE </column-handle> </mapping> <mapping type="direct-to-field"> <name>id <inherited>true <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.BaseEntity <attribute-name>id </attribute-handle> <column-handle> <column-table-name>PETS <column-name>ID </column-handle> </mapping> <mapping type="direct-to-field"> <name>name <inherited>true <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.NamedEntity <attribute-name>name </attribute-handle> <column-handle> <column-table-name>PETS <column-name>NAME </column-handle> </mapping> <mapping type="one-to-one"> <name>owner <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.Pet <attribute-name>owner </attribute-handle> <reference-descriptor-handle> <descriptor-name>org.springframework.samples.petclinic.Owner </reference-descriptor-handle> <reference-handle> <reference-table-name>PETS <reference-name>FK_PETS_OWNERS </reference-handle> </mapping> <mapping type="one-to-one"> <name>type <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.Pet <attribute-name>type </attribute-handle> <reference-descriptor-handle> <descriptor-name>org.springframework.samples.petclinic.PetType </reference-descriptor-handle> <reference-handle> <reference-table-name>PETS <reference-name>FK_PETS_TYPES </reference-handle> </mapping> <mapping type="one-to-many"> <name>visits <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.Pet <attribute-name>visits </attribute-handle> <reference-descriptor-handle> <descriptor-name>org.springframework.samples.petclinic.Visit </reference-descriptor-handle> <indirection-type>transparentIndirection <reference-handle> <reference-table-name>VISITS <reference-name>FK_VISITS_PETS </reference-handle> <container-policy type="set"> <container-class> <uses-default-container-class>true </container-class> </container-policy> </mapping> </mappings> <inherited-attribute-handles> <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.BaseEntity <attribute-name>id </attribute-handle> <attribute-handle> <attribute-declaring-type-name>org.springframework.samples.petclinic.NamedEntity <attribute-name>name </attribute-handle> </inherited-attribute-handles> <primary-table-handle> <table-name>PETS </primary-table-handle> <uses-sequencing>true <sequence-number-name>SEQ <sequence-number-table-handle> <table-name>PETS </sequence-number-table-handle> <sequence-number-column-handle> <column-table-name>PETS <column-name>ID </sequence-number-column-handle> </descriptor> Other Spring Framework examples (source code examples)Here is a short list of links related to this Spring Framework org.springframework.samples.petclinic.Pet.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.