2016-10-13 18:18:19 +02:00
|
|
|
package org.gcube.accounting.analytics;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
2016-11-11 10:03:09 +01:00
|
|
|
import org.gcube.accounting.datamodel.AggregatedUsageRecord;
|
2016-11-15 11:21:51 +01:00
|
|
|
|
|
|
|
public class UsageServiceValue extends UsageValue {
|
|
|
|
|
|
|
|
|
2016-11-11 10:03:09 +01:00
|
|
|
protected Class<? extends AggregatedUsageRecord<?, ?>> clz;
|
|
|
|
protected TemporalConstraint temporalConstraint;
|
2016-11-15 11:21:51 +01:00
|
|
|
protected List<FiltersValue> filtersValue;
|
2016-11-11 10:03:09 +01:00
|
|
|
protected String identifier;
|
2016-10-13 18:18:19 +02:00
|
|
|
protected Double d;
|
|
|
|
protected String orderingProperty;
|
2016-11-15 11:21:51 +01:00
|
|
|
|
|
|
|
public String getIdentifier() {
|
|
|
|
return identifier;
|
|
|
|
}
|
|
|
|
public void setIdentifier(String identifier) {
|
|
|
|
this.identifier = identifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Double getD() {
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setD(Double d) {
|
|
|
|
this.d = d;
|
|
|
|
}
|
2016-11-11 10:03:09 +01:00
|
|
|
public TemporalConstraint getTemporalConstraint() {
|
2016-11-15 11:21:51 +01:00
|
|
|
if (temporalConstraint!=null)
|
|
|
|
return temporalConstraint;
|
|
|
|
else
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getOrderingProperty() {
|
|
|
|
return orderingProperty;
|
2016-11-11 10:03:09 +01:00
|
|
|
}
|
2016-10-13 18:18:19 +02:00
|
|
|
|
2016-11-15 11:21:51 +01:00
|
|
|
public void setOrderingProperty(String orderingProperty) {
|
|
|
|
this.orderingProperty = orderingProperty;
|
|
|
|
}
|
2016-11-11 10:03:09 +01:00
|
|
|
public void setTemporalConstraint(TemporalConstraint temporalConstraint) {
|
|
|
|
this.temporalConstraint = temporalConstraint;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Class<? extends AggregatedUsageRecord<?, ?>> getClz() {
|
|
|
|
return clz;
|
|
|
|
}
|
|
|
|
|
2016-11-15 11:21:51 +01:00
|
|
|
public void setClz(String context,Class<? extends AggregatedUsageRecord<?, ?>> clz) {
|
2016-11-11 10:03:09 +01:00
|
|
|
this.clz = clz;
|
|
|
|
}
|
2016-11-15 11:21:51 +01:00
|
|
|
|
|
|
|
public UsageServiceValue(){}
|
|
|
|
|
|
|
|
public UsageServiceValue(String context,String identifier,Class<? extends AggregatedUsageRecord<?, ?>> clz,TemporalConstraint temporalConstraint,List<FiltersValue> filtersValue){
|
2016-10-13 18:18:19 +02:00
|
|
|
super();
|
2016-11-15 11:21:51 +01:00
|
|
|
this.context=context;
|
|
|
|
this.filtersValue=filtersValue;
|
2016-11-11 10:03:09 +01:00
|
|
|
this.clz=clz;
|
|
|
|
this.temporalConstraint=temporalConstraint;
|
|
|
|
this.identifier=identifier;
|
2016-10-13 18:18:19 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-11-15 11:21:51 +01:00
|
|
|
public List<FiltersValue> getFiltersValue() {
|
|
|
|
return filtersValue;
|
2016-11-11 10:03:09 +01:00
|
|
|
}
|
|
|
|
|
2016-11-15 11:21:51 +01:00
|
|
|
public void setFiltersValue(List<FiltersValue> filtersValue) {
|
|
|
|
this.filtersValue = filtersValue;
|
2016-10-13 18:18:19 +02:00
|
|
|
}
|
2016-11-15 11:21:51 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getContext() {
|
|
|
|
return this.context;
|
2016-10-13 18:18:19 +02:00
|
|
|
}
|
2016-11-15 11:21:51 +01:00
|
|
|
@Override
|
|
|
|
public void setContext(String context) {
|
|
|
|
this.context=context;
|
|
|
|
|
2016-10-13 18:18:19 +02:00
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
2016-11-15 11:21:51 +01:00
|
|
|
return "UsageServiceValue [clz=" + clz + ", temporalConstraint="
|
|
|
|
+ temporalConstraint + ", filtersValue=" + filtersValue
|
2016-11-11 10:03:09 +01:00
|
|
|
+ ", identifier=" + identifier + ", d=" + d
|
2016-11-15 11:21:51 +01:00
|
|
|
+ ", orderingProperty=" + orderingProperty + ", context="
|
|
|
|
+ context + "]";
|
2016-10-13 18:18:19 +02:00
|
|
|
}
|
2016-11-11 10:03:09 +01:00
|
|
|
|
2016-11-15 11:21:51 +01:00
|
|
|
|
|
|
|
|
2016-10-13 18:18:19 +02:00
|
|
|
}
|