1 package org.opensync.engine.server;
2
3 import java.sql.*;
4
5 /***
6 * The default implementation of the function interface.
7 * It gives basic features like simple access to a source.
8 */
9
10 public abstract class DefaultFunction implements Function{
11
12 /***
13 * Construct a <code>DefaultFunction</code>
14 *
15 */
16 public DefaultFunction() {
17 }
18 /***
19 * Get a SQL Connection from the source <code>source</code>.
20 * Warning : The source <code>source</code> must have a BD connector
21 *
22 * @param source The name of the source used in the config.xml file
23 * @exception SQLException
24 *
25 */
26 protected Connection getConnection(String source)throws SQLException{
27 return OpenSync.getInstance().getPoolManager().getConnection(source);
28 }
29 }