accounting-lib/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java

48 lines
1.1 KiB
Java

/**
*
*/
package org.gcube.accounting.datamodel.implementations;
import org.gcube.accounting.datamodel.RawUsageRecord;
import org.gcube.accounting.datamodel.annotations.NotEmpty;
import org.gcube.accounting.exception.InvalidValueException;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*
*/
public class PortletUsageRecord extends RawUsageRecord {
/**
* Generated Serial Version UID
*/
private static final long serialVersionUID = 8339324883678974869L;
@NotEmpty
public static final String USER_ID = "userId";
@NotEmpty
public static final String OPERATION_ID = "operationId";
public PortletUsageRecord(){
super();
}
public String getUserId() {
return (String) this.resourceSpecificProperties.get(USER_ID);
}
public void setUserId(String userId) throws InvalidValueException {
setResourceSpecificProperty(USER_ID, userId);
}
public String getOperationId() {
return (String) this.resourceSpecificProperties.get(OPERATION_ID);
}
public void setOperationId(String operationId) throws InvalidValueException {
setResourceSpecificProperty(OPERATION_ID, operationId);
}
}