Package org.gcube.documentstore.records
Interface AggregatedRecord<A extends AggregatedRecord<A,R>,R extends Record>
-
- All Superinterfaces:
Comparable<Record>,Record,Serializable
public interface AggregatedRecord<A extends AggregatedRecord<A,R>,R extends Record> extends Record
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringAGGREGATEDKEY : Indicate that thisRecordis an aggregationstatic StringEND_TIMEKEY : Represent the right end of the time interval covered by thisAggregatedRecord.static StringOPERATION_COUNTKEY : Indicate The Number ofAggregatedRecordstatic StringSTART_TIMEKEY : Represent the left end of the time interval covered by thisAggregatedRecord.-
Fields inherited from interface org.gcube.documentstore.records.Record
CREATION_TIME, ID, RECORD_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Aaggregate(A record)Aaggregate(R record)Class<R>getAggregable()Set<String>getAggregatedFields()CalendargetEndTime()intgetOperationCount()CalendargetStartTime()booleanisAggregable(A record)booleanisAggregable(R record)voidsetEndTime(Calendar endTime)voidsetOperationCount(int operationCount)voidsetStartTime(Calendar startTime)-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.gcube.documentstore.records.Record
getComputedFields, getCreationTime, getId, getQuerableKeys, getRecordType, getRequiredFields, getResourceProperties, getResourceProperty, removeResourceProperty, setCreationTime, setId, setResourceProperties, setResourceProperty, validate
-
-
-
-
Field Detail
-
AGGREGATED
static final String AGGREGATED
KEY : Indicate that thisRecordis an aggregation- See Also:
- Constant Field Values
-
OPERATION_COUNT
static final String OPERATION_COUNT
KEY : Indicate The Number ofAggregatedRecord- See Also:
- Constant Field Values
-
START_TIME
static final String START_TIME
KEY : Represent the left end of the time interval covered by thisAggregatedRecord. The value will be recorded in UTC milliseconds from the epoch.- See Also:
- Constant Field Values
-
END_TIME
static final String END_TIME
KEY : Represent the right end of the time interval covered by thisAggregatedRecord. The value will be recorded in UTC milliseconds from the epoch.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAggregatedFields
Set<String> getAggregatedFields()
- Returns:
- a Set containing the keys of aggregated fields The returned Set MUST be a copy of the internal representation. Any modification to the returned Set MUST not affect the object
-
getOperationCount
int getOperationCount()
-
setOperationCount
void setOperationCount(int operationCount) throws InvalidValueException- Throws:
InvalidValueException
-
getStartTime
Calendar getStartTime()
-
setStartTime
void setStartTime(Calendar startTime) throws InvalidValueException
- Throws:
InvalidValueException
-
getEndTime
Calendar getEndTime()
-
setEndTime
void setEndTime(Calendar endTime) throws InvalidValueException
- Throws:
InvalidValueException
-
aggregate
A aggregate(A record) throws NotAggregatableRecordsExceptions
- Throws:
NotAggregatableRecordsExceptions
-
aggregate
A aggregate(R record) throws NotAggregatableRecordsExceptions
- Throws:
NotAggregatableRecordsExceptions
-
isAggregable
boolean isAggregable(A record) throws NotAggregatableRecordsExceptions
- Throws:
NotAggregatableRecordsExceptions
-
isAggregable
boolean isAggregable(R record) throws NotAggregatableRecordsExceptions
- Throws:
NotAggregatableRecordsExceptions
-
-