Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.personaldb / org.gvsig.personaldb.lib / org.gvsig.personaldb.lib.api / src / main / java / org / gvsig / personaldb / PersonalDBManager.java @ 40560

History | View | Annotate | Download (3.85 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.personaldb;
25

    
26
import java.sql.Connection;
27

    
28
import org.gvsig.fmap.dal.DataParameters;
29
import org.gvsig.fmap.dal.DataServerExplorerParameters;
30
import org.gvsig.fmap.dal.DataStoreParameters;
31

    
32
/**
33
 * This class is responsible of the management of the library's business logic.
34
 * It is the library's main entry point, and provides all the services to manage
35
 * {@link Connection}s and {@link DataParameters} to connect to the personal
36
 * database.
37
 * 
38
 * @see PersonalDBService
39
 * @author gvSIG team
40
 * @version $Id$
41
 */
42
public interface PersonalDBManager {
43

    
44
    /**
45
     * Returns a {@link Connection} the personal database.
46
     * 
47
     * @return a connection to the personal database
48
     * @throws PersonalDBException
49
     *             if there is an error getting the connection
50
     */
51
    public Connection getConnection() throws PersonalDBException;
52

    
53
    /**
54
     * Returns a {@link DataStoreParameters} to connect to the personal database
55
     * through the DAL library.
56
     * 
57
     * @return the DAL data store parameters to connect to connect to the
58
     *         database
59
     * @throws PersonalDBException
60
     *             if there is an error creating the parameters
61
     */
62
    public DataStoreParameters getDataStoreParameters()
63
        throws PersonalDBException;
64

    
65
    /**
66
     * Returns a {@link DataStoreParameters} to connect to the personal database
67
     * through the DAL library.
68
     * 
69
     * @param schema
70
     *            the schema of the table to load data from
71
     * @param table
72
     *            the name of the table to load data from
73
     * @return the DAL data store parameters to connect to connect to the
74
     *         database
75
     * @throws PersonalDBException
76
     *             if there is an error creating the parameters
77
     */
78
    public DataStoreParameters getDataStoreParameters(String schema,
79
        String table) throws PersonalDBException;
80

    
81
    /**
82
     * Returns a {@link DataServerExplorerParameters} to connect to the personal
83
     * database
84
     * through the DAL library.
85
     * 
86
     * @return the DAL data server explorer parameters to connect to connect to
87
     *         the
88
     *         database
89
     * @throws PersonalDBException
90
     *             if there is an error creating the parameters
91
     */
92
    public DataServerExplorerParameters getDataServerExplorerParameters()
93
        throws PersonalDBException;
94

    
95
    /**
96
     * Returns a {@link DataServerExplorerParameters} to connect to the personal
97
     * database
98
     * through the DAL library.
99
     * 
100
     * @param schema
101
     *            the schema of the database to connect to
102
     * @return the DAL data server explorer parameters to connect to connect to
103
     *         the
104
     *         database
105
     * @throws PersonalDBException
106
     *             if there is an error creating the parameters
107
     */
108
    public DataServerExplorerParameters getDataServerExplorerParameters(
109
        String schema) throws PersonalDBException;
110

    
111
}