org.rhq.core.domain.measurement
Class MeasurementSchedule

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

public class MeasurementSchedule
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static String DELETE_BY_RESOURCES
           
static String DISABLE_ALL
           
static String FIND_ALL_FOR_DEFINITIONS
           
static String FIND_ALL_FOR_RESOURCE_ID
          Find all MeasurementSchedules that are attached to the resource passed by its id in :resourceId
static String FIND_BY_IDS
           
static String FIND_BY_RESOURCE_IDS_AND_DEFINITION_IDS
          Find schedules by definitions and resource.
static String FIND_ENABLED_BY_RESOURCE_IDS_AND_RESOURCE_TYPE_ID
           
static String FIND_ENABLED_BY_RESOURCES_AND_RESOURCE_TYPE
           
static String FIND_SCHEDULE_COMPOSITE_FOR_RESOURCE
          Find MeasureScheduleComposites for a resource.
static String FIND_SCHEDULES_WITH_BASLINES_TO_CALC
          Finds schedules that have a baseline attached that needs to be recalculated.
static String GET_SCHEDULED_MEASUREMENTS_PER_MINUTED
           
static long MINIMUM_INTERVAL
           
static String NATIVE_QUERY_INSERT_SCHEDULES_ORACLE
           
static String NATIVE_QUERY_INSERT_SCHEDULES_POSTGRES
           
static String NATIVE_QUERY_INSERT_SCHEDULES_SQL_SERVER
           
static String NATIVE_QUERY_REPORTING_RESOURCE_MEASUREMENT_SCHEDULE_REQUEST
           
 
Constructor Summary
MeasurementSchedule()
           
MeasurementSchedule(MeasurementDefinition definition, Resource resource)
          Construct a new MeasurementSchedule
 
Method Summary
 boolean equals(Object obj)
           
 MeasurementBaseline getBaseline()
           
 MeasurementDefinition getDefinition()
           
 int getId()
           
 long getInterval()
           
 Long getMtime()
           
 Resource getResource()
           
 int hashCode()
           
 boolean isEnabled()
           
 void setBaseline(MeasurementBaseline baseline)
           
 void setDefinition(MeasurementDefinition myDefinition)
           
 void setEnabled(boolean enabled)
           
 void setId(int id)
           
 void setInterval(long interval)
           
 void setResource(Resource resource)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_INTERVAL

public static final long MINIMUM_INTERVAL
See Also:
Constant Field Values

FIND_SCHEDULES_WITH_BASLINES_TO_CALC

public static final String FIND_SCHEDULES_WITH_BASLINES_TO_CALC
Finds schedules that have a baseline attached that needs to be recalculated. MeasuremetType is passed in :measType, baseline compute time in :ctime

See Also:
Constant Field Values

FIND_ALL_FOR_RESOURCE_ID

public static final String FIND_ALL_FOR_RESOURCE_ID
Find all MeasurementSchedules that are attached to the resource passed by its id in :resourceId

See Also:
Constant Field Values

FIND_BY_RESOURCE_IDS_AND_DEFINITION_IDS

public static final String FIND_BY_RESOURCE_IDS_AND_DEFINITION_IDS
Find schedules by definitions and resource. Definitions are in :definitionIds, resource id is in :resourceId

See Also:
Constant Field Values

FIND_SCHEDULE_COMPOSITE_FOR_RESOURCE

public static final String FIND_SCHEDULE_COMPOSITE_FOR_RESOURCE
Find MeasureScheduleComposites for a resource. Resource id is passed in :resourceId

See Also:
Constant Field Values

GET_SCHEDULED_MEASUREMENTS_PER_MINUTED

public static final String GET_SCHEDULED_MEASUREMENTS_PER_MINUTED
See Also:
Constant Field Values

DISABLE_ALL

public static final String DISABLE_ALL
See Also:
Constant Field Values

FIND_ENABLED_BY_RESOURCES_AND_RESOURCE_TYPE

public static final String FIND_ENABLED_BY_RESOURCES_AND_RESOURCE_TYPE
See Also:
Constant Field Values

FIND_ENABLED_BY_RESOURCE_IDS_AND_RESOURCE_TYPE_ID

public static final String FIND_ENABLED_BY_RESOURCE_IDS_AND_RESOURCE_TYPE_ID
See Also:
Constant Field Values

DELETE_BY_RESOURCES

public static final String DELETE_BY_RESOURCES
See Also:
Constant Field Values

FIND_ALL_FOR_DEFINITIONS

public static final String FIND_ALL_FOR_DEFINITIONS
See Also:
Constant Field Values

FIND_BY_IDS

public static final String FIND_BY_IDS
See Also:
Constant Field Values

NATIVE_QUERY_REPORTING_RESOURCE_MEASUREMENT_SCHEDULE_REQUEST

public static final String NATIVE_QUERY_REPORTING_RESOURCE_MEASUREMENT_SCHEDULE_REQUEST
See Also:
Constant Field Values

NATIVE_QUERY_INSERT_SCHEDULES_POSTGRES

public static final String NATIVE_QUERY_INSERT_SCHEDULES_POSTGRES
See Also:
Constant Field Values

NATIVE_QUERY_INSERT_SCHEDULES_ORACLE

public static final String NATIVE_QUERY_INSERT_SCHEDULES_ORACLE
See Also:
Constant Field Values

NATIVE_QUERY_INSERT_SCHEDULES_SQL_SERVER

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

MeasurementSchedule

public MeasurementSchedule()

MeasurementSchedule

public MeasurementSchedule(MeasurementDefinition definition,
                           Resource resource)
Construct a new MeasurementSchedule

Parameters:
definition - The definition to apply
resource - The resource this schedule is for
Method Detail

getInterval

public long getInterval()

toString

public String toString()
Overrides:
toString in class Object

getBaseline

public MeasurementBaseline getBaseline()
Returns:
the baseline

setBaseline

public void setBaseline(MeasurementBaseline baseline)
Parameters:
baseline - the baseline to set

isEnabled

public boolean isEnabled()
Returns:
if the schedule is enabled

setEnabled

public void setEnabled(boolean enabled)
Parameters:
enabled - the enabled to set

getMtime

public Long getMtime()
Returns:
the mtime

getDefinition

public MeasurementDefinition getDefinition()
Returns:
the myDefinition

setDefinition

public void setDefinition(MeasurementDefinition myDefinition)
Parameters:
myDefinition - the myDefinition to set

getResource

public Resource getResource()

setResource

public void setResource(Resource resource)

getId

public int getId()
Returns:
the id

setId

public void setId(int id)

setInterval

public void setInterval(long interval)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.