RawUsageRecord (CommonAccountingModel 1.1.0-SNAPSHOT API)
Date: 2015-09-28

org.gcube.accounting.datamodel

## Class RawUsageRecord

- java.lang.Object
- - org.gcube.accounting.datamodel.RawUsageRecord

- All Implemented Interfaces:
    Serializable, UsageRecord

      public class RawUsageRecord
      extends Object
      implements UsageRecord, Serializable

  A base implementation of the UsageRecord interface
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RawUsageRecord()` Base constructor.
    `RawUsageRecord(UsageRecord r)` Instantiate this record using values from the given record

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAggregatedId()` Return the id of the usage record aggregating this
    `String` | `getConsumerId()` Return the identity of the entity that consumed the resource
    `Date` | `getCreateTime()` Return the creation time for this usage record
    `String` | `getCreatorId()` Return the identity of the entity creating this usage record
    `Date` | `getEndTime()` Return the right end of the time interval covered by this usage record
    `String` | `getFullyQualifiedConsumerId()`
    `String` | `getId()` Return the unique id for this usage record
    `String` | `getResourceOwner()` Return the identity of the owner of the resource
    `String` | `getResourceScope()` Return the scope of the resource
    `Map<String,String>` | `getResourceSpecificProperties()` Return all resource-specific properties
    `String` | `getResourceSpecificProperty(String key)` Return the value of the given resource-specific property
    `String` | `getResourceType()` Return the type of the resource this usage records refers to
    `Date` | `getStartTime()` Return the left end of the time interval covered by this usage record
    `void` | `setAggregatedId(String aggregatedId)` Set the id of the usage record aggregating this
    `void` | `setConsumerId(String consumerId)` Set the identity of the entity that consumed the resource
    `void` | `setCreateTime(Date createTime)` Set the creation time for this usage record
    `void` | `setCreatorId(String creatorId)` Set the identity of the entity creating this usage record
    `void` | `setEndTime(Date endTime)` Set the right end of the time interval covered by this usage record
    `void` | `setFullyQualifiedConsumerId(String fqcid)`
    `void` | `setId(String id)` Set the unique id for this usage record
    `void` | `setResourceOwner(String owner)` Set the scope of the resource
    `void` | `setResourceScope(String scope)` Set the scope of the resource
    `void` | `setResourceSpecificProperties(Map<String,String> props)` Set all resource-specific properties, replacing existing ones
    `void` | `setResourceSpecificProperty(String name, String value)` Set the value of the given resource-specific property
    `void` | `setResourceType(String resourceType)` Set the type of the resource this usage records refers to
    `void` | `setStartTime(Date startTime)` Set the left end of the time interval covered by this usage record
    `String` | `toString()`
    `void` | `validate()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RawUsageRecord

          public RawUsageRecord()

      Base constructor. Just initialize the id

    - #### RawUsageRecord

          public RawUsageRecord(UsageRecord r)
                         throws InvalidValueException

      Instantiate this record using values from the given record
      Parameters:
        `r` -
      Throws:
        `InvalidValueException`

  - ### Method Detail

    - #### getCreateTime

          public Date getCreateTime()

      Return the creation time for this usage record
      Specified by:
        `getCreateTime` in interface `UsageRecord`
      Returns:

    - #### setCreateTime

          public void setCreateTime(Date createTime)

      Set the creation time for this usage record
      Specified by:
        `setCreateTime` in interface `UsageRecord`

    - #### getCreatorId

          public String getCreatorId()

      Return the identity of the entity creating this usage record
      Specified by:
        `getCreatorId` in interface `UsageRecord`

    - #### setCreatorId

          public void setCreatorId(String creatorId)

      Set the identity of the entity creating this usage record
      Specified by:
        `setCreatorId` in interface `UsageRecord`

    - #### getConsumerId

          public String getConsumerId()

      Return the identity of the entity that consumed the resource
      Specified by:
        `getConsumerId` in interface `UsageRecord`
      Returns:

    - #### setConsumerId

          public void setConsumerId(String consumerId)

      Set the identity of the entity that consumed the resource
      Specified by:
        `setConsumerId` in interface `UsageRecord`

    - #### getFullyQualifiedConsumerId

          public String getFullyQualifiedConsumerId()

      Specified by:
        `getFullyQualifiedConsumerId` in interface `UsageRecord`
      Returns:

    - #### setFullyQualifiedConsumerId

          public void setFullyQualifiedConsumerId(String fqcid)

      Specified by:
        `setFullyQualifiedConsumerId` in interface `UsageRecord`

    - #### getStartTime

          public Date getStartTime()

      Description copied from interface: `UsageRecord`
      Return the left end of the time interval covered by this usage record
      Specified by:
        `getStartTime` in interface `UsageRecord`
      Returns:
        the startTime

    - #### setStartTime

          public void setStartTime(Date startTime)
                            throws InvalidValueException

      Set the left end of the time interval covered by this usage record
      Specified by:
        `setStartTime` in interface `UsageRecord`
      Throws:
        `InvalidValueException`

    - #### setEndTime

          public void setEndTime(Date endTime)
                          throws InvalidValueException

      Set the right end of the time interval covered by this usage record
      Specified by:
        `setEndTime` in interface `UsageRecord`
      Throws:
        `InvalidValueException`

    - #### getEndTime

          public Date getEndTime()

      Return the right end of the time interval covered by this usage record
      Specified by:
        `getEndTime` in interface `UsageRecord`
      Returns:

    - #### getId

          public String getId()

      Return the unique id for this usage record
      Specified by:
        `getId` in interface `UsageRecord`
      Returns:

    - #### setResourceSpecificProperty

          public void setResourceSpecificProperty(String name,
                                         String value)

      Set the value of the given resource-specific property
      Specified by:
        `setResourceSpecificProperty` in interface `UsageRecord`

    - #### getResourceSpecificProperty

          public String getResourceSpecificProperty(String key)

      Return the value of the given resource-specific property
      Specified by:
        `getResourceSpecificProperty` in interface `UsageRecord`
      Returns:

    - #### setId

          public void setId(String id)

      Set the unique id for this usage record
      Specified by:
        `setId` in interface `UsageRecord`

    - #### getAggregatedId

          public String getAggregatedId()

      Return the id of the usage record aggregating this
      Specified by:
        `getAggregatedId` in interface `UsageRecord`
      Returns:

    - #### setAggregatedId

          public void setAggregatedId(String aggregatedId)

      Set the id of the usage record aggregating this
      Specified by:
        `setAggregatedId` in interface `UsageRecord`

    - #### getResourceType

          public String getResourceType()

      Return the type of the resource this usage records refers to
      Specified by:
        `getResourceType` in interface `UsageRecord`
      Returns:

    - #### setResourceType

          public void setResourceType(String resourceType)

      Set the type of the resource this usage records refers to
      Specified by:
        `setResourceType` in interface `UsageRecord`

    - #### getResourceOwner

          public String getResourceOwner()

      Return the identity of the owner of the resource
      Specified by:
        `getResourceOwner` in interface `UsageRecord`
      Returns:

    - #### setResourceOwner

          public void setResourceOwner(String owner)

      Set the scope of the resource
      Specified by:
        `setResourceOwner` in interface `UsageRecord`

    - #### setResourceScope

          public void setResourceScope(String scope)

      Set the scope of the resource
      Specified by:
        `setResourceScope` in interface `UsageRecord`

    - #### getResourceScope

          public String getResourceScope()

      Return the scope of the resource
      Specified by:
        `getResourceScope` in interface `UsageRecord`
      Returns:

    - #### getResourceSpecificProperties

          public Map<String,String> getResourceSpecificProperties()

      Return all resource-specific properties
      Specified by:
        `getResourceSpecificProperties` in interface `UsageRecord`
      Returns:

    - #### setResourceSpecificProperties

          public void setResourceSpecificProperties(Map<String,String> props)

      Set all resource-specific properties, replacing existing ones
      Specified by:
        `setResourceSpecificProperties` in interface `UsageRecord`

    - #### validate

          public void validate()
                        throws InvalidValueException

      Specified by:
        `validate` in interface `UsageRecord`
      Throws:
        `InvalidValueException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015. All Rights Reserved.