Class Queries
java.lang.Object
org.gcube.accounting.accounting.summary.access.impl.Queries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringasIDSet(ScopeDescriptor desc) getAvailableDimensions(Instant from, Instant to, ScopeDescriptor scope, MeasureResolution resolution) Returns Dimensions.* fieldsReturned parameters order is ID,LABELReturned parameters order is ID,LABEL,GROUP,AGGREGATED_MEASURElonggetMeasureCount(String table) Returned parameters order is Context, Dimension, Time, Measure, Measure NB : Measure is replicated in order to manage update on conflictprepareMeasuresByDimension(ScopeDescriptor scope, MeasureResolution resolution) Prepares a statement for Getting Dim=?
-
Constructor Details
-
Queries
public Queries()
-
-
Method Details
-
getMeasureCount
- Throws:
SQLException
-
listDimensions
- Throws:
SQLException
-
listContexts
- Throws:
SQLException
-
getMeasureInsertionPreparedStatement
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
Returned parameters order is ID,LABEL,GROUP,AGGREGATED_MEASURE- Returns:
- Throws:
SQLException
-
getContextInsertionPreparedStatement
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
-