/** * */ package org.gcube.accounting.datamodel.implementations.aggregated; import java.util.List; import org.gcube.accounting.datamodel.AggregatedUsageRecord; import org.gcube.accounting.datamodel.decorators.AggregatedField; import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; import org.gcube.accounting.exception.InvalidValueException; /** * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ * */ public class ServiceUsageRecord extends org.gcube.accounting.datamodel.implementations.ServiceUsageRecord implements AggregatedUsageRecord { /** * Generated Serial Version UID */ private static final long serialVersionUID = 6387584974618335623L; @ValidInteger @AggregatedField protected static final String INVOCATION_COUNT = "invocationCount"; @ValidInteger @AggregatedField protected static final String AVERAGE_INVOCATION_COUNT = "averageInvocationTime"; public ServiceUsageRecord(){ super(); } public String getInvocationCount() { return (String) this.resourceProperties.get(INVOCATION_COUNT); } public void setInvocationCount(String invocationCount) throws InvalidValueException { setResourceProperty(INVOCATION_COUNT, invocationCount); } public String getAverageInvocationTime() { return (String) this.resourceProperties.get(AVERAGE_INVOCATION_COUNT); } public void setAverageInvocationTime(String averageInvocationTime) throws InvalidValueException { setResourceProperty(AVERAGE_INVOCATION_COUNT, averageInvocationTime); } /** * {@inheritDoc} */ @Override public List aggregate(List records) { // TODO implements throw new UnsupportedOperationException(); } }