Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package dictionary.test;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.util.Map;
- /**
- *
- * @author Daron
- */
- public class PreparedStatementArray implements java.sql.Array {
- int[] ints;
- String baseTypeName, toString;
- public PreparedStatementArray(int[] ints) {
- StringBuilder toStringBuilder;
- this.ints = ints;
- baseTypeName = "INTEGER";
- toStringBuilder = new StringBuilder("{\"");
- for (int index = 0; index < ints.length - 1; index++) {
- toStringBuilder.append(ints[index] + ", ");
- }
- toStringBuilder.append(ints[ints.length - 1] + "}");
- toString = toStringBuilder.toString();
- }
- public String getBaseTypeName() throws SQLException {
- return baseTypeName;
- }
- public int getBaseType() throws SQLException {
- return java.sql.Types.INTEGER;
- }
- public Object getArray() throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public Object getArray(Map<String, Class<?>> map) throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public Object getArray(long index, int count) throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public Object getArray(long index, int count, Map<String, Class<?>> map) throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public ResultSet getResultSet() throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public ResultSet getResultSet(long index, int count) throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- public void free() throws SQLException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- @Override
- public String toString() {
- return toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement