Author: tfischer
Date: Thu Sep 4 19:51:09 2014
New Revision: 1622543
URL: http://svn.apache.org/r1622543
Log:
TORQUE-309 Add test for interface to generated peer classes
Added:
db/torque/torque4/trunk/torque-test/src/main/java/org/apache/torque/TestPeerInterface.java
Modified:
db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
Added:
db/torque/torque4/trunk/torque-test/src/main/java/org/apache/torque/TestPeerInterface.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/java/org/apache/torque/TestPeerInterface.java?rev=1622543&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-test/src/main/java/org/apache/torque/TestPeerInterface.java
(added)
+++
db/torque/torque4/trunk/torque-test/src/main/java/org/apache/torque/TestPeerInterface.java
Thu Sep 4 19:51:09 2014
@@ -0,0 +1,36 @@
+package org.apache.torque;
+
+import org.apache.torque.om.ObjectKey;
+import org.apache.torque.util.ColumnValues;
+
+/*
+ * 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.
+ */
+
+/**
+ * Test interface to check if the peerInterface attribute of <table>
+ * does what it is supposed to do.
+ *
+ * @author <a href="mailto:[email protected]">Thomas Fox</a>
+ * @version $Id: TestInterface.java 1331200 2012-04-27 03:02:10Z tfischer $
+ */
+
+public interface TestPeerInterface
+{
+ ObjectKey doInsert(ColumnValues columnValues) throws TorqueException;
+}
Modified: db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml?rev=1622543&r1=1622542&r2=1622543&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml
(original)
+++ db/torque/torque4/trunk/torque-test/src/main/schema/test-schema.xml Thu Sep
4 19:51:09 2014
@@ -121,6 +121,7 @@
<table name="ifc_table" idMethod="none"
interface="org.apache.torque.TestInterface"
+ peerInterface="org.apache.torque.TestPeerInterface"
description="this table implements an interface">
<column name="id" javaName="ID" primaryKey="true" type="INTEGER" />
<column name="name" javaName="Name" type="VARCHAR" size="50" />
@@ -128,6 +129,7 @@
<table name="local_ifc_table" idMethod="none"
interface="LocalTestInterface"
+ peerInterface="LocalTestPeerInterface"
description="this table implements a local interface">
<column name="id" javaName="ID" primaryKey="true" type="INTEGER" />
<column name="name" javaName="Name" type="VARCHAR" size="50" />
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]