112 lines
3.2 KiB
Java
112 lines
3.2 KiB
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.accounting.datamodel.implementations;
|
|
|
|
import org.gcube.accounting.datamodel.aggregated.StorageStatusUsageRecord;
|
|
import org.gcube.accounting.datamodel.validators.NotEmptyIfNotNull;
|
|
import org.gcube.accounting.datamodel.validators.ValidIP;
|
|
import org.gcube.accounting.datamodel.validators.ValidInteger;
|
|
import org.gcube.accounting.datamodel.validators.ValidLong;
|
|
import org.gcube.accounting.exception.InvalidValueException;
|
|
import org.gcube.common.validator.annotations.NotEmpty;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
*
|
|
*/
|
|
public class StorageUsageUsageRecord extends StorageStatusUsageRecord {
|
|
|
|
/**
|
|
* Generated Serial Version UID
|
|
*/
|
|
private static final long serialVersionUID = 1381025822586583326L;
|
|
|
|
@NotEmptyIfNotNull
|
|
public static final String OBJECT_URI = "objectURI";
|
|
@NotEmpty
|
|
public static final String OPERATION_TYPE = "operationType";
|
|
@ValidIP
|
|
public static final String CALLER_IP = "callerIP";
|
|
@NotEmpty
|
|
public static final String PROVIDER_ID = "providerId";
|
|
@NotEmpty
|
|
public static final String QUALIFIER = "qualifier";
|
|
@NotEmpty
|
|
public static final String DATA_TYPE = "dataType";
|
|
@ValidLong
|
|
public static final String DATA_VOLUME = "dataVolume";
|
|
@ValidInteger
|
|
public static final String DATA_COUNT = "dataCount";
|
|
|
|
|
|
public StorageUsageUsageRecord(){
|
|
super();
|
|
}
|
|
|
|
public String getObjectURI() {
|
|
return (String) this.resourceSpecificProperties.get(OBJECT_URI);
|
|
}
|
|
|
|
public void setObjectURI(String objectURI) throws InvalidValueException {
|
|
setResourceSpecificProperty(OBJECT_URI, objectURI);
|
|
}
|
|
|
|
public String getOperationType() {
|
|
return (String) this.resourceSpecificProperties.get(OPERATION_TYPE);
|
|
}
|
|
|
|
public void setOperationType(String operationType) throws InvalidValueException {
|
|
setResourceSpecificProperty(OPERATION_TYPE, operationType);
|
|
}
|
|
|
|
public String getCallerIP() {
|
|
return (String) this.resourceSpecificProperties.get(CALLER_IP);
|
|
}
|
|
|
|
public void setCallerIP(String callerIP) throws InvalidValueException {
|
|
setResourceSpecificProperty(CALLER_IP, callerIP);
|
|
}
|
|
|
|
public String getProviderId() {
|
|
return (String) this.resourceSpecificProperties.get(PROVIDER_ID);
|
|
}
|
|
|
|
public void setProviderId(String providerId) throws InvalidValueException {
|
|
setResourceSpecificProperty(PROVIDER_ID, providerId);
|
|
}
|
|
|
|
public String getQualifier() {
|
|
return (String) this.resourceSpecificProperties.get(QUALIFIER);
|
|
}
|
|
|
|
public void setQualifier(String qualifier) throws InvalidValueException {
|
|
setResourceSpecificProperty(QUALIFIER, qualifier);
|
|
}
|
|
|
|
public String getDataType() {
|
|
return (String) this.resourceSpecificProperties.get(DATA_TYPE);
|
|
}
|
|
|
|
public void setDataType(String dataType) throws InvalidValueException {
|
|
setResourceSpecificProperty(DATA_TYPE, dataType);
|
|
}
|
|
|
|
public long getDataVolume() {
|
|
return (Long) this.resourceSpecificProperties.get(DATA_VOLUME);
|
|
}
|
|
|
|
public void setDataVolume(long dataVolume) throws InvalidValueException {
|
|
setResourceSpecificProperty(DATA_VOLUME, dataVolume);
|
|
}
|
|
|
|
public int getDataCount() {
|
|
return (Integer) this.resourceSpecificProperties.get(DATA_COUNT);
|
|
}
|
|
|
|
public void setDataCount(int dataCount) throws InvalidValueException {
|
|
setResourceSpecificProperty(DATA_COUNT, dataCount);
|
|
}
|
|
|
|
}
|