poi/xmlbeans/samples/vxsdb/global.vm

34 lines
1.3 KiB
Plaintext
Raw Normal View History

## Copyright 2002-2004 Apache Software Foundation
##
## 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.
##
## This template expoits the SchemaType XmlBeans object using the $global
## identifier.
<column name="PK" type="INTEGER" required="true" primaryKey="true"/>
#foreach($property in $global.properties)## SchemaProperty[]
## Column name and data type. Columns may be foreign keys
#parse("property.vm")
#end
#if( $exportedKeyMap.get($global.name.toString()) )## Map returns a List
#foreach($exportedKey in $exportedKeyMap.get($global.name.toString()))## String in List
<!-- Exported key -->
<column name="FK_$exportedKey" type="INTEGER" />
<foreign-key foreignTable="$exportedKey">
<reference local="FK_$exportedKey" foreign="PK"/>
</foreign-key>
#end
#end