01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05: package org.jasig.portal.rdbm;
06:
07: import java.util.Date;
08:
09: /**
10: * @author susan.bramhall@yale.edu
11: * @version $Revision: 36682 $
12: * Apr 8, 2005
13: *
14: */
15: public interface IDatabaseMetadata {
16: /**
17: * Gets the appropriate {@link IJoinQueryString} implemenation for
18: * the database. If {@link #supportsOuterJoins()} returns <code>false</code>
19: * this will return <code>null</code>.
20: *
21: * @return The appropriate {@link IJoinQueryString} implemenation.
22: */
23: public IJoinQueryString getJoinQuery();
24:
25: /**
26: * Returns <code>true</code> if the database server supports outer
27: * joins. The query to use if this returns <code>true</code> can
28: * be retrieved from the {@link #getJoinQuery()} method.
29: *
30: * @return <code>true</code> if the server supports outer joins.
31: */
32: public boolean supportsOuterJoins();
33:
34: /**
35: * Returns <code>true</code> if the database server supports transactions.
36: *
37: * @return <code>true</code> if the server supports transactions.
38: */
39: public boolean supportsTransactions();
40:
41: /**
42: * Returns <code>true</code> if the database server supports prepared statements.
43: *
44: * @return <code>true</code> if the server supports prepared statements.
45: */
46: public boolean supportsPreparedStatements();
47:
48: /**
49: * SQL TimeStamp format of current time.
50: *
51: * @return SQL TimeStamp of the current time.
52: */
53: public String sqlTimeStamp();
54:
55: /**
56: * SQL TimeStamp format a long.
57: *
58: * @param date The time in milliseconds to format.
59: * @return SQL TimeStamp of the specified time.
60: */
61: public String sqlTimeStamp(long date);
62:
63: /**
64: * SQL TimeStamp format a Date.
65: *
66: * @param date The date to format.
67: * @return SQL TimeStamp or "NULL" if date is null.
68: */
69: public String sqlTimeStamp(Date date);
70: }
|