org.gcube.messaging.common.consumerlibrary.query
Class SystemAccountingQuery

java.lang.Object
  extended by org.gcube.messaging.common.consumerlibrary.query.Query<ConsumerCL>
      extended by org.gcube.messaging.common.consumerlibrary.query.SystemAccountingQuery
All Implemented Interfaces:
Serializable

public class SystemAccountingQuery
extends Query<ConsumerCL>

Author:
Andrea Manzi(CERN)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.gcube.messaging.common.consumerlibrary.query.Query
call, dateFormat, groupClause, limitClause, orderClause, query, results
 
Constructor Summary
SystemAccountingQuery()
           
 
Method Summary
 ArrayList<ArrayList<String>> getTypeContent(String name)
          Get the table content stored on the SystemAccounting DB
 JSONArray getTypeContentAsJSONObject(String name)
          Get the table content stored on the SystemAccounting DB as JSON Object
 String getTypeContentAsJSONString(String name)
          Get the table content stored on the SystemAccounting DB as JSON
 ArrayList<String> getTypes()
          Get the types ( tables ) stored on the SystemAccounting DB
 String performQuery()
          The method implemented by subclasses, that performed the query
 JSONArray queryTypeContentAsJSONObject(String query)
          Get the table content stored on the SystemAccounting DB as JSON Object
 String queryTypeContentAsJSONString(String query)
          Get the table content stored on the SystemAccounting DB as JSON
 
Methods inherited from class org.gcube.messaging.common.consumerlibrary.query.Query
getCall, getDimensions, getGroupClause, getLimitClause, getOrderClause, getQuery, getResults, getResultsAsArray, printQueryResults, query, setCall, setGroupClause, setLimitClause, setLimitClause, setOrderClause, setQuery, setResults, toJSON
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemAccountingQuery

public SystemAccountingQuery()
Method Detail

performQuery

public String performQuery()
                    throws Exception
Description copied from class: Query
The method implemented by subclasses, that performed the query

Specified by:
performQuery in class Query<ConsumerCL>
Returns:
the query result as a string
Throws:
Exception

getTypes

public ArrayList<String> getTypes()
                           throws QueryNotSetException,
                                  Exception
Get the types ( tables ) stored on the SystemAccounting DB

Returns:
List of types
Throws:
QueryNotSetException
Exception

getTypeContent

public ArrayList<ArrayList<String>> getTypeContent(String name)
                                            throws QueryNotSetException,
                                                   Exception
Get the table content stored on the SystemAccounting DB

Parameters:
type - the table name
Returns:
table content
Throws:
QueryNotSetException
Exception

getTypeContentAsJSONString

public String getTypeContentAsJSONString(String name)
                                  throws QueryNotSetException,
                                         Exception
Get the table content stored on the SystemAccounting DB as JSON

Parameters:
type - the table name
Returns:
table content
Throws:
QueryNotSetException
Exception

getTypeContentAsJSONObject

public JSONArray getTypeContentAsJSONObject(String name)
                                     throws QueryNotSetException,
                                            Exception
Get the table content stored on the SystemAccounting DB as JSON Object

Parameters:
type - the table name
Returns:
table content as JSONArray
Throws:
QueryNotSetException
Exception

queryTypeContentAsJSONString

public String queryTypeContentAsJSONString(String query)
                                    throws QueryNotSetException,
                                           Exception
Get the table content stored on the SystemAccounting DB as JSON

Parameters:
query - the SQL Query
Returns:
query results as JSON String
Throws:
QueryNotSetException
Exception

queryTypeContentAsJSONObject

public JSONArray queryTypeContentAsJSONObject(String query)
                                       throws QueryNotSetException,
                                              Exception
Get the table content stored on the SystemAccounting DB as JSON Object

Parameters:
query - the SQL Query
Returns:
query results as JSON Object
Throws:
QueryNotSetException
Exception


Copyright © 2013. All Rights Reserved.