Skip to main content
summaryrefslogtreecommitdiffstats
blob: 344fe9288b99dd08e08f9cbaaba78ef58ac9dec3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*******************************************************************************
 * Copyright (c) 2004, 2007 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.framework.database.core;

import java.io.Closeable;
import java.io.InputStream;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import org.eclipse.osee.framework.core.exception.OseeDataStoreException;

/**
 * @author Jeff C. Phillips
 * @author Ryan D. Brooks
 */
public interface IOseeStatement extends Closeable {

   void runPreparedQuery(String query, Object... data) throws OseeDataStoreException;

   /**
    * @param fetchSize hint as to the number of rows that should be fetched from the database at a time. will be limited
    * to 10,000
    * @throws OseeDataStoreException
    */
   void runPreparedQuery(int fetchSize, String query, Object... data) throws OseeDataStoreException;

   /**
    * Invokes a stored procedure parameters of type SQL3DataType are registered as Out parameters and all others are set
    * as in parameters
    * 
    * @throws OseeDataStoreException
    */
   void runCallableStatement(String query, Object... data) throws OseeDataStoreException;

   boolean next() throws OseeDataStoreException;

   /**
    * The application must call close when it is done using this object; however, it is safe to use this same object
    * multiple times, for example calling runPreparedQuery() repeatedly, without any intermediate calls to close
    */
   @Override
   void close();

   InputStream getBinaryStream(String columnName) throws OseeDataStoreException;

   InputStream getAsciiStream(String columnName) throws OseeDataStoreException;

   String getString(String columnName) throws OseeDataStoreException;

   float getFloat(String columnName) throws OseeDataStoreException;

   long getLong(String columnName) throws OseeDataStoreException;

   int getInt(String columnName) throws OseeDataStoreException;

   Timestamp getTimestamp(String columnName) throws OseeDataStoreException;

   BigDecimal getBigDecimal(String name) throws OseeDataStoreException;

   Time getTime(String name) throws OseeDataStoreException;

   double getDouble(String columnName) throws OseeDataStoreException;

   Date getDate(String columnName) throws OseeDataStoreException;

   boolean wasNull() throws OseeDataStoreException;

   int getColumnCount() throws OseeDataStoreException;

   String getColumnName(int columnIndex) throws OseeDataStoreException;

   int getColumnType(int columnIndex) throws OseeDataStoreException;

   String getColumnTypeName(int columnIndex) throws OseeDataStoreException;

   Object getObject(int columnIndex) throws OseeDataStoreException;

   /**
    * Returns the number of rows in the result set. Once this method returns the result set will be pointing to the last
    * row
    * 
    * @return the number of rows in the result set
    * @throws OseeDataStoreException
    */
   int getRowCount() throws OseeDataStoreException;

   boolean isNullable(int columnIndex) throws OseeDataStoreException;

   double getCallableDouble(int columnIndex) throws OseeDataStoreException;

   /**
    * should not be used by application code because it is less readable than using the column name
    * 
    * @return value
    * @throws OseeDataStoreException
    */
   int getInt(int columnIndex) throws OseeDataStoreException;

   int getCallableInt(int columnIndex) throws OseeDataStoreException;

   /**
    * should not be used by application code because it is less readable than using the column name
    * 
    * @return value
    * @throws OseeDataStoreException
    */
   long getLong(int columnIndex) throws OseeDataStoreException;

   /**
    * should not be used by application code because it is less readable than using the column name
    * 
    * @return value
    * @throws OseeDataStoreException
    */
   String getString(int columnIndex) throws OseeDataStoreException;

   String getComplementSql() throws OseeDataStoreException;

   boolean isDatabaseType(SupportedDatabase type) throws OseeDataStoreException;

   void updateObject(String columnName, Object value) throws OseeDataStoreException;

   void updateRow() throws OseeDataStoreException;
}

Back to the top