db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r910600 [29/29] - in /db/torque/torque4/trunk: maven-torque-gf-plugin/ maven-torque-gf-plugin/src/ maven-torque-gf-plugin/src/main/ maven-torque-gf-plugin/src/main/java/ maven-torque-gf-plugin/src/main/java/org/ maven-torque-gf-plugin/src/m...
Date Tue, 16 Feb 2010 17:16:02 GMT
Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableComment.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableComment.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableComment.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/tableComment.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($description.length() > 0)
+COMMENT ON TABLE $name IS '$description';
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/unique.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/unique.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/unique.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/oracle/unique.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($uniqueColumnNames != "")
+    UNIQUE($uniqueColumnNames),
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/columnComment.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/columnComment.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/columnComment.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/columnComment.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,20 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($description.length() > 0)
+#set ( $tableName = $torqueGf.getParent().getAttribute("name") )
+COMMENT ON COLUMN ${tableName}.${name} IS '$description';
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/drop.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/drop.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/drop.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/drop.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,20 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+DROP TABLE $name CASCADE;
+#if ($idMethod == "native")
+DROP SEQUENCE $sequenceName;
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/foreignKey.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,29 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+ALTER TABLE $torqueGf.getParent().getAttribute("name")
+    ADD CONSTRAINT $name
+    FOREIGN KEY ($localColumnNames)
+    REFERENCES $foreignTable ($foreignColumnNames)##
+#if ($onUpdate)
+
+    ON UPDATE $onUpdate##
+#end
+#if ($onDelete)
+
+    ON DELETE $onDelete##
+#end
+;

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/index.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,21 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#set ( $tableName = $torqueGf.getParent().getAttribute("name") )
+#if ($indexColumnNames != "")
+CREATE INDEX#if($name) $name#end ON $tableName ($indexColumnNames);
+#end
+

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/primaryKey.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($primaryKeyColumnNames != "")
+    PRIMARY KEY ($primaryKeyColumnNames),
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/sequence.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($idMethod == "native")
+CREATE SEQUENCE $sequenceName INCREMENT BY 1 START WITH 1 NO MAXVALUE NO CYCLE;
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/table.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,36 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+
+-----------------------------------------------------------------------------
+-- $name
+-----------------------------------------------------------------------------
+$torqueGf.mergepoint("drop")
+
+CREATE TABLE $name
+(
+#set ( $cols = $torqueGf.mergepoint("columns") )
+#set ( $pk = $torqueGf.mergepoint("primaryKey") )
+#set ( $unique = $torqueGf.mergepoint("unique") )
+#if($stringUtils.allEmpty([$pk,$unique]))$stringUtils.chop($cols,2)#else$cols#end
+#if($stringUtils.allEmpty([$unique]) && $pk.length()>0)$stringUtils.chop($pk,2)#else$pk#end
+#if($unique.length() > 0)$stringUtils.chop($unique,2)#end
+
+)##
+$torqueGf.mergepoint("createOptions")##
+;
+$torqueGf.mergepoint("index")
+$torqueGf.mergepoint("sequence")

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/tableComment.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,21 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($description.length() > 0)
+COMMENT ON TABLE $name IS '$description';
+#end
+
+$torqueGf.mergepoint("columnComment")##

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.vm (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/sql/templates/ddl/postgresql/unique.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+#if ($uniqueColumnNames != "")
+    CONSTRAINT $name UNIQUE ($uniqueColumnNames),
+#end

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/OMTableTransformer.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/OMTableTransformer.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/OMTableTransformer.properties (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/OMTableTransformer.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+${attribute(noOverride):dbObjectClassName}=${option:torque.om.className.dbObjectClassNamePrefix}${attribute:javaName}${option:torque.om.className.dbObjectClassNameSuffix}
+${attribute(noOverride):baseDbObjectClassName}=${option:torque.om.className.baseDbObjectClassNamePrefix}${attribute:javaName}${option:torque.om.className.baseDbObjectClassNameSuffix}
+${attribute(noOverride):peerClassName}=${option:torque.om.className.peerClassNamePrefix}${attribute:javaName}${option:torque.om.className.peerClassNameSuffix}
+${attribute(noOverride):basePeerClassName}=${option:torque.om.className.basePeerClassNamePrefix}${attribute:javaName}${option:torque.om.className.basePeerClassNameSuffix}
+${attribute(noOverride):beanClassName}=${option:torque.om.className.beanClassNamePrefix}${attribute:javaName}${option:torque.om.className.beanClassNameSuffix}
+${attribute(noOverride):baseBeanClassName}=${option:torque.om.className.baseBeanClassNamePrefix}${attribute:javaName}${option:torque.om.className.baseBeanClassNameSuffix}
+${attribute(noOverride):mapBuilderClassName}=${option:torque.om.className.mapBuilderClassNamePrefix}${attribute:javaName}${option:torque.om.className.mapBuilderClassNameSuffix}
+
+${attribute(noOverride):dbObjectPackage}=${option:torque.om.package.package}${option:torque.om.package.dbObjectPackageSuffix}
+${attribute(noOverride):baseDbObjectPackage}=${option:torque.om.package.package}${option:torque.om.package.baseDbObjectPackageSuffix}
+${attribute(noOverride):peerPackage}=${option:torque.om.package.package}${option:torque.om.package.peerPackageSuffix}
+${attribute(noOverride):basePeerPackage}=${option:torque.om.package.package}${option:torque.om.package.basePeerPackageSuffix}
+${attribute(noOverride):managerPackage}=${option:torque.om.package.package}${option:torque.om.package.managerPackageSuffix}
+${attribute(noOverride):baseManagerPackage}=${option:torque.om.package.package}${option:torque.om.package.baseManagerPackageSuffix}
+${attribute(noOverride):beanPackage}=${option:torque.om.package.package}${option:torque.om.package.beanPackageSuffix}
+${attribute(noOverride):baseBeanPackage}=${option:torque.om.package.package}${option:torque.om.package.baseBeanPackageSuffix}
+${attribute(noOverride):mapBuilderPackage}=${option:torque.om.package.package}${option:torque.om.package.mapPackageSuffix}

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/dbobject/base/BaseDbObjectTableTransformer.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/dbobject/base/BaseDbObjectTableTransformer.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/dbobject/base/BaseDbObjectTableTransformer.properties (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/dbobject/base/BaseDbObjectTableTransformer.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.

Added: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/MapInitDatabaseTransformer.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/MapInitDatabaseTransformer.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/MapInitDatabaseTransformer.properties (added)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/transformer/om/mapInit/MapInitDatabaseTransformer.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+${attribute(noOverride):mapBuilderPackage}=${option:torque.om.package.package}${option:torque.om.package.mapPackageSuffix}

Added: db/torque/torque4/trunk/torque-templates/src/site/site.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/site/site.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/site/site.xml (added)
+++ db/torque/torque4/trunk/torque-templates/src/site/site.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<project name="torque templates">
+  <bannerLeft>
+    <name>The apache db project</name>
+    <href>http://db.apache.org</href>
+  </bannerLeft>
+  <bannerRight>
+    <name>torque-gf templates</name>
+    <href>http://db.apache.org/torque</href>
+  </bannerRight>
+  <body>
+    <menu name="Documentation">
+      <item name="Introduction" href="index.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/site/xdoc/index.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/site/xdoc/index.xml (added)
+++ db/torque/torque4/trunk/torque-templates/src/site/xdoc/index.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Torque-gf templates</title>
+ </properties>
+
+ <body>
+  <section name="Introduction">
+    <p>
+      The torque-gf templates are a set of templates for the torque-gf 
+      code generator to produce code and sql for a given data model.
+      The data model needs to follow the torque dtd.<br/>
+      In the templates, the different generation goals (om classes, sql, doc...)
+      are organized in different packages. For each generation goal,
+      the correct package needs to be accessed. This is described in detail
+      in the following sections.<br/>
+      In the following, it is assumed that the maven 2 torque-gf plugin is
+      used to process the templates.
+    </p>
+    <subsection name="preparation">
+      <p>
+        For adding the maven 2 torque-gf plugin to your build, add the following
+        to your pom.xml:
+      </p>
+      <source><![CDATA[
+      <plugin>
+        <groupId>org.apache.torque</groupId>
+        <artifactId>maven-torque-gf-plugin</artifactId>
+        <version>0.2-SNAPSHOT</version>
+        <executions>
+           ...(see below)
+        </executions
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.torque</groupId>
+            <artifactId>templates-4-0</artifactId>
+            <version>0.2-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      ]]></source>
+    </subsection>
+    <subsection name="Generation of om classes">
+      <p>
+        For generating the OM classes, add the following execution to the
+        executions list of the maven torque-gf plugin:
+      </p>
+      <source><![CDATA[
+          <execution>
+            <id>generate-sources</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.om</configPackage>
+              <sourceDir>${torque.schema.source.dir}</sourceDir>
+              <options>
+                <torque.om.package>${torque.target.package}</torque.om.package>
+                <torque.database>${torque.target.database}</torque.database>
+              </options>
+            </configuration>
+          </execution>
+      ]]></source>
+      <p>
+        Replace ${torque.target.database} with the target databsase type 
+        (e.g. mysql, oracle). Replace ${torque.schema.source.dir} 
+        with the directory where you put your database schemata 
+        (e.g. /src/main/schema). Replace ${torque.target.package} 
+        with the base package for your generation, e.g. org.apache.torque.test.
+      </p>
+      <p>
+        This will generate the om code in the directories 
+        target/generated-sources and src/main/generated-sources.
+      </p>
+    </subsection> 
+    <subsection name="Generation of ddl sql">
+      <p>
+        For generating the data description language(ddl) sql for the tables,
+        add the following execution to the executions list
+        of the maven torque-gf plugin:
+      </p>
+      <source><![CDATA[
+          <execution>
+            <id>generate-sql</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.sql</configPackage>
+              <sourceDir>${torque.schema.source.dir}</sourceDir>
+              <newFileTargetDir>target/generated-sql</newFileTargetDir>
+              <compileNewFileTargetDir>false</compileNewFileTargetDir>
+              <compileModifiedFileTargetDir>false</compileModifiedFileTargetDir>
+              <options>
+                <torque.database>${torque.target.database}</torque.database>
+              </options>
+            </configuration>
+          </execution>
+      ]]></source>
+      <p>
+        Replace ${torque.target.database} with the target databsase type 
+        (e.g. mysql, oracle). Replace ${torque.schema.source.dir} 
+        with the directory where you put your database schemata 
+        (e.g. /src/main/schema). 
+      </p>
+      <p>
+        This will generate the sql code in the directory 
+        target/generated-sql.
+      </p>
+    </subsection> 
+    <subsection name="Generation of html documentation">
+      <p>
+        For generating html documentation for the tables,
+        add the following execution to the executions list
+        of the maven torque-gf plugin:
+      </p>
+      <source><![CDATA[
+          <execution>
+            <id>generate-html-doc</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.doc.html</configPackage>
+              <sourceDir>${torque.schema.source.dir}</sourceDir>
+              <newFileTargetDir>target/generated-docs</newFileTargetDir>
+              <compileNewFileTargetDir>false</compileNewFileTargetDir>
+              <compileModifiedFileTargetDir>false</compileModifiedFileTargetDir>
+              <options>
+                <torque.om.package>${torque.target.package}</torque.om.package>
+                <torque.database>${torque.target.database}</torque.database>
+              </options>
+            </configuration>
+          </execution>
+      ]]></source>
+      <p>
+        Replace ${torque.target.database} with the target databsase type 
+        (e.g. mysql, oracle). Replace ${torque.schema.source.dir} 
+        with the directory where you put your database schemata 
+        (e.g. /src/main/schema). Replace ${torque.target.package} 
+        with the base package for your generation, e.g. org.apache.torque.test.
+      </p>
+      <p>
+        This will generate the html documentation in the directory 
+        target/generated-docs.
+      </p>
+    </subsection> 
+    <subsection name="Generation of xdoc documentation">
+      <p>
+        For generating xdoc documentation for the tables (to be included),
+        into your maven site, add the following execution to the executions list
+        of the maven torque-gf plugin:
+      </p>
+      <source><![CDATA[
+          <execution>
+            <id>generate-xdoc</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <packaging>classpath</packaging>
+              <configPackage>org.apache.torque.templates.doc.xdoc</configPackage>
+              <sourceDir>${torque.schema.source.dir}</sourceDir>
+              <newFileTargetDir>target/generated-xdocs</newFileTargetDir>
+              <compileNewFileTargetDir>false</compileNewFileTargetDir>
+              <options>
+                <torque.om.package>${torque.target.package}</torque.om.package>
+                <torque.database>${torque.target.database}</torque.database>
+              </options>
+            </configuration>
+          </execution>
+      ]]></source>
+      <p>
+        Replace ${torque.target.database} with the target databsase type 
+        (e.g. mysql, oracle). Replace ${torque.schema.source.dir} 
+        with the directory where you put your database schemata 
+        (e.g. /src/main/schema). Replace ${torque.target.package} 
+        with the base package for your generation, e.g. org.apache.torque.test.
+      </p>
+      <p>
+        This will generate the xdoc documentation in the directory 
+        target/generated-xdocs. You may then want to add the following
+        configuration to your pom to include this directory in your site:
+      </p>
+      <source><![CDATA[
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <groupId>org.apache.maven.plugins</groupId>
+        <configuration>
+          <xdocDirectory>target/generated-xdocs</xdocDirectory>
+        </configuration>
+      </plugin>
+      ]]></source>        
+    </subsection> 
+  </section>
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java (added)
+++ db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/TestProcessing.java Tue Feb 16 17:15:43 2010
@@ -0,0 +1,146 @@
+package org.apache.torque.templates;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.torque.gf.configuration.UnitDescriptor;
+import org.apache.torque.gf.configuration.option.MapOptionsConfiguration;
+import org.apache.torque.gf.configuration.paths.CustomProjectPaths;
+import org.apache.torque.gf.configuration.paths.DefaultTorqueGfPaths;
+import org.apache.torque.gf.configuration.paths.Maven2DirectoryProjectPaths;
+import org.apache.torque.gf.control.Controller;
+import org.junit.Test;
+
+public class TestProcessing
+{
+    @Test
+    public void testProcessSchemaXml() throws Exception
+    {
+        Controller controller = new Controller();
+        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
+        Map<String, String> overrideOptions = new HashMap<String, String>();
+        overrideOptions.put("torque.database", "mysql");
+        overrideOptions.put("torque.om.package", "org.apache.torque.test");
+
+        // om templates
+        CustomProjectPaths projectPaths
+                = new CustomProjectPaths(
+                    new Maven2DirectoryProjectPaths(new File(".")));
+        projectPaths.setConfigurationDir(
+                new File("src/main/resources/org/apache/torque/templates/om"));
+        projectPaths.setSourceDir(
+                new File("src/test/schema"));
+        projectPaths.setModifiedFileTargetDir(
+                new File("target/generated-sources-2"));
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGfPaths(),
+                null,
+                new MapOptionsConfiguration(overrideOptions),
+                null));
+
+        // sql templates
+        projectPaths
+                = new CustomProjectPaths(
+                    new Maven2DirectoryProjectPaths(new File(".")));
+        projectPaths.setConfigurationDir(
+                new File("src/main/resources/org/apache/torque/templates/sql"));
+        projectPaths.setSourceDir(
+                new File("src/test/schema"));
+        projectPaths.setNewFileTargetDir(
+                new File("target/generated-sql"));
+        projectPaths.setModifiedFileTargetDir(
+                new File("target/generated-sql-2"));
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGfPaths(),
+                null,
+                new MapOptionsConfiguration(overrideOptions),
+                null));
+
+        // idbroker-init-sql templates
+        projectPaths
+                = new CustomProjectPaths(
+                    new Maven2DirectoryProjectPaths(new File(".")));
+        projectPaths.setConfigurationDir(
+                new File("src/main/resources/org/apache/torque/templates/idtable"));
+        projectPaths.setSourceDir(
+                new File("src/test/schema"));
+        projectPaths.setNewFileTargetDir(
+                new File("target/generated-sql"));
+        projectPaths.setModifiedFileTargetDir(
+                new File("target/generated-sql-2"));
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGfPaths(),
+                null,
+                new MapOptionsConfiguration(overrideOptions),
+                null));
+
+        // html doc templates
+        projectPaths = new CustomProjectPaths(
+                    new Maven2DirectoryProjectPaths(new File(".")));
+        projectPaths.setConfigurationDir(
+                new File("src/main/resources/org/apache/torque/templates/doc/html"));
+        projectPaths.setSourceDir(
+                new File("src/test/schema"));
+        projectPaths.setNewFileTargetDir(
+                new File("target/generated-docs"));
+        projectPaths.setModifiedFileTargetDir(
+                new File("target/generated-docs-2"));
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGfPaths(),
+                null,
+                new MapOptionsConfiguration(overrideOptions),
+                null));
+
+        // xdoc doc templates
+        projectPaths = new CustomProjectPaths(
+                new Maven2DirectoryProjectPaths(new File(".")));
+        projectPaths.setConfigurationDir(
+                new File("src/main/resources/org/apache/torque/templates/doc/xdoc"));
+        projectPaths.setSourceDir(
+                new File("src/test/schema"));
+        projectPaths.setNewFileTargetDir(
+                new File("target/generated-xdocs"));
+        projectPaths.setModifiedFileTargetDir(
+                new File("target/generated-xdocs-2"));
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                projectPaths,
+                new DefaultTorqueGfPaths(),
+                null,
+                new MapOptionsConfiguration(overrideOptions),
+                null));
+
+        // generate
+        controller.run(unitDescriptors);
+    }
+}

Added: db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml (added)
+++ db/torque/torque4/trunk/torque-templates/src/test/schema/schema.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+<!--DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_3.dtd"-->
+
+<database
+  name="bookstore"
+  defaultIdMethod="native">
+
+  <!-- =================================================== -->
+  <!-- B O O K  T A B L E                                  -->
+  <!-- =================================================== -->
+
+  <table name="book" description="Book table">
+    <column
+      name="book_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+      description="Book Id"
+    />
+    <column
+      name="isbn"
+      required="true"
+      type="VARCHAR"
+      size="15"
+      description="ISBN"
+    />
+    <column
+      name="author_id"
+      required="true"
+      type="INTEGER"
+      description="Foreign Key Author"
+    />
+    <column
+      name="title"
+      required="true"
+      type="VARCHAR"
+      size="255"
+      description="Book Title"
+    />
+
+    <foreign-key name="AUTHOR_FK" foreignTable="author" onUpdate="cascade" onDelete="setNull">
+      <reference local="author_id" foreign="author_id"/>
+    </foreign-key>
+
+    <unique>
+      <unique-column name="isbn" />
+    </unique>
+
+    <index name="TITLE_INDEX">
+      <index-column name="title" />
+    </index>
+  </table>
+
+
+  <!-- =================================================== -->
+  <!-- A U T H O R  T A B L E                              -->
+  <!-- =================================================== -->
+
+  <table name="author" description="Author table">
+    <column
+      name="author_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="name"
+      required="true"
+      type="VARCHAR"
+      size="50"
+    />
+
+  </table>
+
+
+  <!-- =================================================== -->
+  <!-- T E S T   T A B L E                                 -->
+  <!-- =================================================== -->
+
+  <!-- TRQS51 Datadump does not recognize null columns properly -->
+  <table name="NULL_VALUE_TABLE"
+         description="table containing null values to test datadump">
+    <column name="NULL_VALUE_TABLE_ID" primaryKey="true" required="true" type="INTEGER"/>
+    <column name="number1" type="INTEGER"/>
+    <column name="number2" type="INTEGER" default="2"/>
+    <column name="number3" type="INTEGER"/>
+    <column name="text1" type="VARCHAR" size="20"/>
+    <column name="text2" type="VARCHAR" size="20" default="defaultValue"/>
+    <column name="number_obj1" type="INTEGER" javaType="object"/>
+    <column name="number_obj2" type="INTEGER" javaType="object" default="2"/>
+
+  </table>
+
+
+  <!-- =================================================== -->
+  <!-- A  T A B L E                                        -->
+  <!-- =================================================== -->
+
+  <table name="a" description="A table">
+    <column
+      name="a_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="name"
+      required="true"
+      type="VARCHAR"
+      size="50"
+    />
+
+  </table>
+
+  <!-- =================================================== -->
+  <!-- B  T A B L E                                        -->
+  <!-- =================================================== -->
+
+  <table name="b" description="B table">
+    <column
+      name="b_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="name"
+      required="true"
+      type="VARCHAR"
+      size="50"
+    />
+
+  </table>
+
+
+  <!-- =================================================== -->
+  <!-- AB  T A B L E                                       -->
+  <!-- =================================================== -->
+
+  <table name="r_ab" description="r_ab table" idMethod="none">
+    <column
+      name="a_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="b_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="name"
+      required="true"
+      type="VARCHAR"
+      size="50"
+    />
+
+    <foreign-key foreignTable="a">
+      <reference local="a_id" foreign="a_id"/>
+    </foreign-key>
+
+    <foreign-key foreignTable="b">
+      <reference local="b_id" foreign="b_id"/>
+    </foreign-key>
+
+  </table>
+
+  <!-- =================================================== -->
+  <!-- C  T A B L E                                       -->
+  <!-- =================================================== -->
+
+  <table name="c" description="c table contains fk to ar_ab, a and b">
+    <column
+      name="c_id"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="a_id"
+      required="true"
+      type="INTEGER"
+    />
+    <column
+      name="b_id"
+      required="true"
+      type="INTEGER"
+    />
+    <column
+      name="name"
+      required="true"
+      type="VARCHAR"
+      size="50"
+    />
+
+    <foreign-key foreignTable="r_ab">
+      <reference local="a_id" foreign="a_id"/>
+      <reference local="b_id" foreign="b_id"/>
+    </foreign-key>
+
+    <foreign-key foreignTable="a">
+      <reference local="a_id" foreign="a_id"/>
+    </foreign-key>
+
+    <foreign-key foreignTable="b">
+      <reference local="b_id" foreign="b_id"/>
+    </foreign-key>
+
+  </table>
+
+
+  <table name="d" idMethod="none">
+    <column name="d_id" required="true"
+            primaryKey="true" type="INTEGER"/>
+    <column name="name" required="true" size="255" type="VARCHAR"/>
+    <column name="b_id" primaryKey="true" required="true" type="INTEGER"/>
+    <column name="a_id" primaryKey="true" required="true" type="INTEGER"/>
+    <foreign-key foreignTable="a">
+        <reference local="a_id" foreign="a_id"/>
+    </foreign-key>
+    <foreign-key foreignTable="r_ab">
+        <reference local="a_id" foreign="a_id"/>
+        <reference local="b_id" foreign="b_id"/>
+    </foreign-key>
+  </table>
+
+
+  <!-- =================================================== -->
+  <!-- N O P K  T A B L E                                  -->
+  <!-- =================================================== -->
+
+  <table name="nopk" idMethod="none" description="this table has no pk">
+    <column
+      name="intcol"
+      type="INTEGER"
+    />
+    <column
+      name="name"
+      type="VARCHAR"
+      size="50"
+    />
+  </table>
+
+  <table name="MULTIPK_SELF_REFTABLE" idMethod="none">
+    <column name="COL1" primaryKey="true" required="true" type="DECIMAL"/>
+    <column name="COL2" primaryKey="true" required="true" type="DECIMAL"/>
+
+    <column name="PARENT_COL1" required="true" type="DECIMAL"/>
+    <column name="PARENT_COL2" required="true" type="DECIMAL"/>
+
+    <foreign-key foreignTable="MULTIPK_SELF_REFTABLE">
+      <reference foreign="COL1" local="PARENT_COL1"/>
+      <reference foreign="COL2" local="PARENT_COL2"/>
+    </foreign-key>
+  </table>
+
+  <!-- =================================================== -->
+  <!-- T A B L E  W I T H  I N T E R F A C E               -->
+  <!-- =================================================== -->
+
+  <table name="ifc_table" idMethod="none"
+  	interface="org.apache.torque.TestInterface"
+  	description="this table implements an interface">
+    <column
+      name="id" javaName="ID"
+      primaryKey="true" required="true"
+      type="INTEGER"
+    />
+    <column
+      name="name" javaName="Name"
+      type="VARCHAR"
+      size="50"
+    />
+  </table>
+
+  <table name="ifc_table2" idMethod="none"
+  	interface="LocalTestInterface"
+  	description="this table implements a local interface">
+    <column
+      name="id" javaName="ID"
+      primaryKey="true" required="true"
+      type="INTEGER"
+    />
+    <column
+      name="name" javaName="Name"
+      type="VARCHAR"
+      size="50"
+    />
+  </table>
+  
+  <table name="INHERITANCE_TEST" description="Table to test inheritance">
+    <column
+      name="INHERITANCE_TEST"
+      required="true"
+      primaryKey="true"
+      type="INTEGER"
+    />
+    <column
+      name="CLASS_NAME"
+      inheritance="single"
+      type="CHAR"
+      size="1">
+      <inheritance
+        key="B"
+        class="InheritanceChildB"
+        extends="org.apache.torque.test.InheritanceTest"
+      />
+      <inheritance
+        key="C"
+        class="InheritanceChildC"
+      />
+      <inheritance
+        key="D"
+        class="InheritanceChildD"
+        extends="org.apache.torque.test.InheritanceChildC"
+      />
+    </column>
+    <column
+      name="PAYLOAD_PARENT"
+      required="true"
+      type="VARCHAR"
+      size="100"
+      protected="false"
+     />
+    <column
+      name="PAYLOAD_B"
+      type="VARCHAR"
+      size="100"
+      protected="true"
+    />
+    <column
+      name="PAYLOAD_C"
+      type="VARCHAR"
+      size="100"
+    />
+    <column
+      name="PAYLOAD_D"
+      type="VARCHAR"
+      size="100"
+    />
+  </table>
+
+</database>



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message