KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > persist > db > DatabaseTest2DatabaseFactory


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: DatabaseTest2DatabaseFactory.java,v 1.6 2007/01/28 06:54:43 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.persist.db;
23
24 import java.sql.ResultSet JavaDoc;
25
26 import org.opensubsystems.core.data.DataConstant;
27 import org.opensubsystems.core.data.DataObject;
28 import org.opensubsystems.core.error.OSSDatabaseAccessException;
29 import org.opensubsystems.core.error.OSSException;
30 import org.opensubsystems.core.persist.DatabaseTestFactory;
31
32 /**
33  * This factory is here just to test that we can correctly instantiate database
34  * factories.
35  *
36  * @version $Id: DatabaseTest2DatabaseFactory.java,v 1.6 2007/01/28 06:54:43 bastafidli Exp $
37  * @author Miro Halas
38  * @code.reviewer Miro Halas
39  * @code.reviewed Initial revision
40  */

41 public class DatabaseTest2DatabaseFactory implements DatabaseTestFactory,
42                                                      DatabaseFactory
43 {
44
45    /**
46     * {@inheritDoc}
47     */

48    public DataObject load(
49       ResultSet JavaDoc rsQueryResults,
50       int initialIndex
51    ) throws OSSDatabaseAccessException
52    {
53       // Nothing to do, this is just to test instantiation of this class
54
return null;
55    }
56
57    /**
58     * {@inheritDoc}
59     */

60    public DataObject get(
61       int iId,
62       int iDomainId
63    ) throws OSSException
64    {
65       // Nothing to do, this is just to test instantiation of this class
66
return null;
67    }
68
69    /**
70     * {@inheritDoc}
71     */

72    public int getDataType()
73    {
74       return DataConstant.NO_DATA_TYPE;
75    }
76 }
77
Popular Tags