KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: DatabaseTestDatabaseFactory.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: DatabaseTestDatabaseFactory.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 DatabaseTestDatabaseFactory implements DatabaseTestFactory,
42                                                     DatabaseFactory
43 {
44    /**
45     * {@inheritDoc}
46     */

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

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

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