org.rhq.core.domain.measurement
Class MeasurementDataTrait

java.lang.Object
  extended by org.rhq.core.domain.measurement.MeasurementData
      extended by org.rhq.core.domain.measurement.MeasurementDataTrait
All Implemented Interfaces:
Serializable

public class MeasurementDataTrait
extends MeasurementData

See Also:
Serialized Form

Field Summary
static String FIND_ALL_FOR_RESOURCE_AND_DEFINITION
          Find all trait data for the provided resource id and definition id resource id is first parameter definition id is second parameter
static String FIND_CURRENT_FOR_RESOURCE
          Find all current traits for a Resource in :resourceId
static String FIND_CURRENT_FOR_RESOURCE_AND_DISPLAY_TYPE
          Find current traits for a Resource in :resourceId that have a certain displayType in :displayType
static String FIND_CURRENT_FOR_SCHEDULES
          Find the current traits for the schedule ids passed in :scheduleIds
static String NATIVE_QUERY_PURGE
           
static String QUERY_DELETE_BY_RESOURCES
           
 
Constructor Summary
protected MeasurementDataTrait()
           
  MeasurementDataTrait(long timestamp, MeasurementScheduleRequest request, String value)
          Create a new Trait object.
  MeasurementDataTrait(MeasurementDataPK pk, String value)
          Create a new Trait object.
  MeasurementDataTrait(MeasurementScheduleRequest request, String value)
          Create a new trait object with the current system time for the timestamp.
 
Method Summary
 String getValue()
           
 void setValue(String value)
           
 String toString()
           
 
Methods inherited from class org.rhq.core.domain.measurement.MeasurementData
equals, getName, getScheduleId, getTimestamp, hashCode, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIND_CURRENT_FOR_RESOURCE_AND_DISPLAY_TYPE

public static final String FIND_CURRENT_FOR_RESOURCE_AND_DISPLAY_TYPE
Find current traits for a Resource in :resourceId that have a certain displayType in :displayType

See Also:
Constant Field Values

FIND_CURRENT_FOR_RESOURCE

public static final String FIND_CURRENT_FOR_RESOURCE
Find all current traits for a Resource in :resourceId

See Also:
Constant Field Values

FIND_CURRENT_FOR_SCHEDULES

public static final String FIND_CURRENT_FOR_SCHEDULES
Find the current traits for the schedule ids passed in :scheduleIds

See Also:
Constant Field Values

FIND_ALL_FOR_RESOURCE_AND_DEFINITION

public static final String FIND_ALL_FOR_RESOURCE_AND_DEFINITION
Find all trait data for the provided resource id and definition id resource id is first parameter definition id is second parameter

See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCES

public static final String QUERY_DELETE_BY_RESOURCES
See Also:
Constant Field Values

NATIVE_QUERY_PURGE

public static final String NATIVE_QUERY_PURGE
See Also:
Constant Field Values
Constructor Detail

MeasurementDataTrait

public MeasurementDataTrait(MeasurementScheduleRequest request,
                            String value)
Create a new trait object with the current system time for the timestamp.

Parameters:
request - basically the MeasurementSchedule for this trait
value - the metric value of this trait

MeasurementDataTrait

public MeasurementDataTrait(long timestamp,
                            MeasurementScheduleRequest request,
                            String value)
Create a new Trait object.

Parameters:
timestamp - time when the measurement was taken
request - basically the MeasurementSchedule for this trait
value - the metric value of this trait

MeasurementDataTrait

public MeasurementDataTrait(MeasurementDataPK pk,
                            String value)
Create a new Trait object. MeasurementSchedule and timestamp are given in the passed pk.

Parameters:
pk - primary key
value - the measurement value for this trait

MeasurementDataTrait

protected MeasurementDataTrait()
Method Detail

getValue

public String getValue()
Specified by:
getValue in class MeasurementData

setValue

public void setValue(String value)

toString

public String toString()
Overrides:
toString in class MeasurementData


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.