org.gcube.application.aquamaps.aquamapsservice.impl.db
Class DBUtils

java.lang.Object
  extended by org.gcube.application.aquamaps.aquamapsservice.impl.db.DBUtils

public class DBUtils
extends Object


Constructor Summary
DBUtils()
           
 
Method Summary
protected static String quote(String string)
          Produce a string in double quotes with backslash sequences in all the right places.
static String toJSon(ResultSet resultSet)
           
static String toJSon(ResultSet resultSet, int start, int end)
           
static String toJSon(ResultSet resultSet, Long count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBUtils

public DBUtils()
Method Detail

toJSon

public static String toJSon(ResultSet resultSet)
                     throws SQLException
Throws:
SQLException

quote

protected static String quote(String string)
Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted within
Parameters:
string - A String
Returns:
A String correctly formatted for insertion in a JSON text.

toJSon

public static String toJSon(ResultSet resultSet,
                            int start,
                            int end)
                     throws SQLException
Throws:
SQLException

toJSon

public static String toJSon(ResultSet resultSet,
                            Long count)
                     throws SQLException
Throws:
SQLException


Copyright © 2013. All Rights Reserved.