|
From: <fc...@us...> - 2008-03-14 09:11:05
|
Revision: 736
http://openutils.svn.sourceforge.net/openutils/?rev=736&view=rev
Author: fcarone
Date: 2008-03-14 02:11:04 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
application tests added
Modified Paths:
--------------
trunk/openutils-spring-rmibernate/pom.xml
Added Paths:
-----------
trunk/openutils-spring-rmibernate/src/test/java/it/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/client/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/client/SetupApplicationTest.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/db/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/db/HsqlDatatypeFactory.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDAO.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDaoImpl.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobject.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChild.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChildContainer.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManager.java
trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManagerImpl.java
Modified: trunk/openutils-spring-rmibernate/pom.xml
===================================================================
--- trunk/openutils-spring-rmibernate/pom.xml 2008-03-11 15:56:41 UTC (rev 735)
+++ trunk/openutils-spring-rmibernate/pom.xml 2008-03-14 09:11:04 UTC (rev 736)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -89,12 +90,6 @@
<version>3.1</version>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.1_3</version>
@@ -104,6 +99,91 @@
<artifactId>asm</artifactId>
<version>2.2.3</version>
</dependency>
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-bshd5</artifactId>
+ <version>2.0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.2.5.ga</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.1.ga</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-testing-junit</artifactId>
+ <version>2.0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-testing</artifactId>
+ <version>2.0.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>xerces</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
<properties>
<spring.version>2.5.1</spring.version>
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/client/SetupApplicationTest.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/client/SetupApplicationTest.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/client/SetupApplicationTest.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,86 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
+
+package it.openutils.spring.rmibernate.testapp.client;
+
+import it.openutils.spring.rmibernate.testapp.db.HsqlDatatypeFactory;
+import it.openutils.spring.rmibernate.testapp.server.DummyDataobject;
+import it.openutils.spring.rmibernate.testapp.server.DummyDataobjectChild;
+import it.openutils.spring.rmibernate.testapp.server.DummyDataobjectChildContainer;
+import it.openutils.spring.rmibernate.testapp.server.DummyManager;
+import it.openutils.testing.DbUnitExecution;
+import it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests;
+
+import java.util.List;
+
+import org.dbunit.operation.InsertOperation;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestExecutionListeners;
+import org.springframework.test.context.transaction.TransactionConfiguration;
+import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
+import org.springframework.transaction.annotation.Transactional;
+
+
+/**
+ * @author fcarone
+ * @version $Id: $
+ */
+@ContextConfiguration(locations = {"/spring-tests.xml" })
+@DbUnitExecution(datasets = {"/HibernateLazyTest-load.xml" }, dataSource = "dataSource", //
+ dataTypeFactory = HsqlDatatypeFactory.class,
+ insertOperation = InsertOperation.class)
+@TestExecutionListeners({TransactionalTestExecutionListener.class })
+@Transactional
+@TransactionConfiguration(transactionManager = "transactionManager")
+public class SetupApplicationTest extends AbstractDbUnitJunitSpringContextTests
+{
+
+ private DummyManager dummyManager;
+
+ @Before
+ public void setupTest()
+ {
+ this.dummyManager = (DummyManager) applicationContext.getBean("dummyManagerRMI");
+ }
+
+ @Test
+ public void loadTest()
+ {
+ List<DummyDataobject> objects = dummyManager.findAll();
+ Assert.assertEquals(3, objects.size());
+ DummyDataobject firstObj = objects.get(0);
+
+ List<DummyDataobjectChildContainer> children = firstObj.getDummyChildrenContainer();
+ for (DummyDataobjectChildContainer container : children)
+ {
+ DummyDataobjectChild child = container.getChild();
+ child.getId();
+ }
+ }
+
+ /**
+ * Sets the dummyManager.
+ * @param dummyManager the dummyManager to set
+ */
+ public void setDummyManager(DummyManager dummyManager)
+ {
+ this.dummyManager = dummyManager;
+ }
+
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/db/HsqlDatatypeFactory.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/db/HsqlDatatypeFactory.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/db/HsqlDatatypeFactory.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it
+ */
+package it.openutils.spring.rmibernate.testapp.db;
+
+import java.sql.Types;
+
+import org.dbunit.dataset.datatype.DataType;
+import org.dbunit.dataset.datatype.DataTypeException;
+import org.dbunit.dataset.datatype.DefaultDataTypeFactory;
+
+
+/**
+ * @author fcarone
+ * @version $Id: HsqlDatatypeFactory.java 672 2008-02-20 17:14:54Z fcarone $
+ */
+public class HsqlDatatypeFactory extends DefaultDataTypeFactory
+{
+
+ /**
+ * {@inheritDoc}
+ * Needed to fix Boolean type recognition for HSQLDB
+ */
+ @Override
+ public DataType createDataType(int sqlType, String sqlTypeName) throws DataTypeException
+ {
+ if (sqlType == Types.BOOLEAN)
+ {
+ return DataType.BOOLEAN;
+ }
+ return super.createDataType(sqlType, sqlTypeName);
+ }
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDAO.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDAO.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDAO.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it
+ */
+package it.openutils.spring.rmibernate.testapp.server;
+
+import it.openutils.dao.hibernate.HibernateDAO;
+
+
+/**
+ * @author fcarone
+ * @version $Id: DummyDAO.java 672 2008-02-20 17:14:54Z fcarone $
+ */
+public interface DummyDAO extends HibernateDAO<DummyDataobject, Long>
+{
+
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDaoImpl.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDaoImpl.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDaoImpl.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it
+ */
+package it.openutils.spring.rmibernate.testapp.server;
+
+import it.openutils.dao.hibernate.HibernateDAOImpl;
+
+
+/**
+ * @author fcarone
+ * @version $Id: DummyDaoImpl.java 672 2008-02-20 17:14:54Z fcarone $
+ */
+public class DummyDaoImpl extends HibernateDAOImpl<DummyDataobject, Long> implements DummyDAO
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Class<DummyDataobject> getReferenceClass()
+ {
+ return DummyDataobject.class;
+ }
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobject.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobject.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobject.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,149 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
+
+package it.openutils.spring.rmibernate.testapp.server;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Fetch;
+import org.hibernate.annotations.FetchMode;
+
+
+/**
+ * @author fcarone
+ * @version $Id: $
+ */
+
+@Entity
+@Table(name = "DUMMYDATAOBJECT")
+public class DummyDataobject implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6314190820929190801L;
+
+ @Id
+ @Column(name = "ID")
+ private Long id;
+
+ @Column(name = "SOMETEXT", length = 64)
+ private String someText;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "DD_CHILD", referencedColumnName = "ID", nullable = true)
+ private DummyDataobjectChild dummyChild;
+
+ @OneToMany(cascade = {javax.persistence.CascadeType.ALL }, fetch = FetchType.LAZY)
+ @JoinColumn(name = "ID_PARENT", nullable = false)
+ @Fetch(FetchMode.SUBSELECT)
+ @org.hibernate.annotations.Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
+ private List<DummyDataobjectChildContainer> dummyChildrenContainer;
+
+
+ /**
+ * Returns the id.
+ * @return the id
+ */
+ public Long getId()
+ {
+ return id;
+ }
+
+
+ /**
+ * Sets the id.
+ * @param id the id to set
+ */
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+
+ /**
+ * Returns the someText.
+ * @return the someText
+ */
+ public String getSomeText()
+ {
+ return someText;
+ }
+
+
+ /**
+ * Sets the someText.
+ * @param someText the someText to set
+ */
+ public void setSomeText(String someText)
+ {
+ this.someText = someText;
+ }
+
+
+ /**
+ * Returns the dummyChild.
+ * @return the dummyChild
+ */
+ public DummyDataobjectChild getDummyChild()
+ {
+ return dummyChild;
+ }
+
+
+ /**
+ * Sets the dummyChild.
+ * @param dummyChild the dummyChild to set
+ */
+ public void setDummyChild(DummyDataobjectChild dummyChild)
+ {
+ this.dummyChild = dummyChild;
+ }
+
+
+ /**
+ * Returns the dummyChildrenContainer.
+ * @return the dummyChildrenContainer
+ */
+ public List<DummyDataobjectChildContainer> getDummyChildrenContainer()
+ {
+ return dummyChildrenContainer;
+ }
+
+
+ /**
+ * Sets the dummyChildrenContainer.
+ * @param dummyChildrenContainer the dummyChildrenContainer to set
+ */
+ public void setDummyChildrenContainer(List<DummyDataobjectChildContainer> dummyChildrenContainer)
+ {
+ this.dummyChildrenContainer = dummyChildrenContainer;
+ }
+
+
+
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChild.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChild.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChild.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,89 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
+
+package it.openutils.spring.rmibernate.testapp.server;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+
+/**
+ * @author fcarone
+ * @version $Id: $
+ */
+@Entity
+@Table(name = "DUMMYDATAOBJECTCHILD")
+public class DummyDataobjectChild implements Serializable
+{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2414567256228343076L;
+
+ @Id
+ @Column(name = "ID")
+ private Long id;
+
+ @Column(name = "SOMETEXT", length = 64)
+ private String someText;
+
+
+ /**
+ * Returns the id.
+ * @return the id
+ */
+ public Long getId()
+ {
+ return id;
+ }
+
+
+ /**
+ * Sets the id.
+ * @param id the id to set
+ */
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+
+
+ /**
+ * Returns the someText.
+ * @return the someText
+ */
+ public String getSomeText()
+ {
+ return someText;
+ }
+
+
+
+ /**
+ * Sets the someText.
+ * @param someText the someText to set
+ */
+ public void setSomeText(String someText)
+ {
+ this.someText = someText;
+ }
+
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChildContainer.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChildContainer.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyDataobjectChildContainer.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,88 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
+
+package it.openutils.spring.rmibernate.testapp.server;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+
+/**
+ * @author fcarone
+ * @version $Id: $
+ */
+@Entity
+@Table(name = "DUMMYDATAOBJECTCONTAINER")
+public class DummyDataobjectChildContainer implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8390282791384850082L;
+
+ @Id
+ @Column(name = "ID")
+ private Long id;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "DD_CHILD", referencedColumnName = "ID", nullable = true)
+ private DummyDataobjectChild child;
+
+ /**
+ * Returns the id.
+ * @return the id
+ */
+ public Long getId()
+ {
+ return id;
+ }
+
+ /**
+ * Sets the id.
+ * @param id the id to set
+ */
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ /**
+ * Returns the child.
+ * @return the child
+ */
+ public DummyDataobjectChild getChild()
+ {
+ return child;
+ }
+
+ /**
+ * Sets the child.
+ * @param child the child to set
+ */
+ public void setChild(DummyDataobjectChild child)
+ {
+ this.child = child;
+ }
+
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManager.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManager.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManager.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,33 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
+
+package it.openutils.spring.rmibernate.testapp.server;
+
+import java.util.List;
+
+
+/**
+ * @author fcarone
+ * @version $Id: $
+ */
+public interface DummyManager
+{
+
+ List<DummyDataobject> findAll();
+
+ DummyDataobject findFilteredFirst(DummyDataobject filter);
+
+}
Added: trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManagerImpl.java
===================================================================
--- trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManagerImpl.java (rev 0)
+++ trunk/openutils-spring-rmibernate/src/test/java/it/openutils/spring/rmibernate/testapp/server/DummyManagerImpl.java 2008-03-14 09:11:04 UTC (rev 736)
@@ -0,0 +1,61 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
+
+package it.openutils.spring.rmibernate.testapp.server;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+/**
+ * @author fcarone
+ * @version $Id: $
+ */
+public class DummyManagerImpl implements DummyManager
+{
+
+ @Autowired
+ private DummyDAO dummyDao;
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<DummyDataobject> findAll()
+ {
+ return dummyDao.findAll();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DummyDataobject findFilteredFirst(DummyDataobject filter)
+ {
+ return dummyDao.findFilteredFirst(filter);
+ }
+
+
+ /**
+ * Sets the dummyDao.
+ * @param dummyDao the dummyDao to set
+ */
+ public void setDummyDao(DummyDAO dummyDao)
+ {
+ this.dummyDao = dummyDao;
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|