Class Queries
- java.lang.Object
-
- org.gcube.accounting.accounting.summary.access.impl.Queries
-
public class Queries extends Object
-
-
Constructor Summary
Constructors Constructor Description Queries()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringasIDSet(ScopeDescriptor desc)ResultSetgetAvailableDimensions(Instant from, Instant to, ScopeDescriptor scope, MeasureResolution resolution)Returns Dimensions.* fieldsPreparedStatementgetContextInsertionPreparedStatement()Returned parameters order is ID,LABELPreparedStatementgetDimensionInsertionPreparedStatement()Returned parameters order is ID,LABEL,GROUP,AGGREGATED_MEASURElonggetMeasureCount(String table)PreparedStatementgetMeasureInsertionPreparedStatement()Returned parameters order is Context, Dimension, Time, Measure, Measure NB : Measure is replicated in order to manage update on conflictResultSetlistContexts()ResultSetlistDimensions()PreparedStatementprepareMeasuresByDimension(ScopeDescriptor scope, MeasureResolution resolution)Prepares a statement for Getting Dim=? in time interval for the scope set PS params : 1- long current slice of time 2- long current slice of time 3- String dimension
-
-
-
Method Detail
-
getMeasureCount
public long getMeasureCount(String table) throws SQLException
- Throws:
SQLException
-
listDimensions
public ResultSet listDimensions() throws SQLException
- Throws:
SQLException
-
listContexts
public ResultSet listContexts() throws SQLException
- Throws:
SQLException
-
getMeasureInsertionPreparedStatement
public PreparedStatement getMeasureInsertionPreparedStatement() throws SQLException
Returned parameters order is Context, Dimension, Time, Measure, Measure NB : Measure is replicated in order to manage update on conflict- Returns:
- PS with parameters
- Throws:
SQLException
-
getDimensionInsertionPreparedStatement
public PreparedStatement getDimensionInsertionPreparedStatement() throws SQLException
Returned parameters order is ID,LABEL,GROUP,AGGREGATED_MEASURE- Returns:
- Throws:
SQLException
-
getContextInsertionPreparedStatement
public PreparedStatement getContextInsertionPreparedStatement() throws SQLException
Returned parameters order is ID,LABEL- Returns:
- Throws:
SQLException
-
getAvailableDimensions
public ResultSet getAvailableDimensions(Instant from, Instant to, ScopeDescriptor scope, MeasureResolution resolution) throws SQLException
Returns Dimensions.* fields- Parameters:
from-to-scope-resolution-- Returns:
- Throws:
SQLException
-
prepareMeasuresByDimension
public PreparedStatement prepareMeasuresByDimension(ScopeDescriptor scope, MeasureResolution resolution) throws SQLException
Prepares a statement for Getting Dim=? in time interval for the scope set PS params : 1- long current slice of time 2- long current slice of time 3- String dimension- Parameters:
from-to-scope-resolution-- Returns:
- Throws:
SQLException
-
asIDSet
public static final String asIDSet(ScopeDescriptor desc)
-
-