org.rhq.core.domain.operation
Class OperationScheduleEntity

java.lang.Object
  extended by org.rhq.core.domain.operation.OperationScheduleEntity
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GroupOperationScheduleEntity, ResourceOperationScheduleEntity

public abstract class OperationScheduleEntity
extends Object
implements Serializable

The entity that represents an operation schedule as persisted in the database. This is the superclass to both the individual resource schedule entity and the group schedule entity.

The purpose of this entity is simply to track schedules so we can query jobs with their associated resources/groups.

See Also:
Serialized Form

Field Summary
static String QUERY_FIND_BY_JOB_ID
           
static String QUERY_GET_SCHEDULE_GROUP
           
static String QUERY_GET_SCHEDULE_GROUP_ADMIN
           
static String QUERY_GET_SCHEDULE_RESOURCE
           
static String QUERY_GET_SCHEDULE_RESOURCE_ADMIN
           
 
Constructor Summary
protected OperationScheduleEntity()
           
protected OperationScheduleEntity(String jobName, String jobGroup, Date nextFireTime)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getJobGroup()
           
 JobId getJobId()
          The single job ID which identifies this specific schedule.
 String getJobName()
           
 int hashCode()
           
 void setJobGroup(String jobGroup)
           
 void setJobName(String jobName)
           
 Long setNextFireTime()
          The next time this schedule is going to fire.
 void setNextFireTime(Long nextFireTime)
          Sets the next time this schedule is going to fire.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_BY_JOB_ID

public static final String QUERY_FIND_BY_JOB_ID
See Also:
Constant Field Values

QUERY_GET_SCHEDULE_RESOURCE

public static final String QUERY_GET_SCHEDULE_RESOURCE
See Also:
Constant Field Values

QUERY_GET_SCHEDULE_RESOURCE_ADMIN

public static final String QUERY_GET_SCHEDULE_RESOURCE_ADMIN
See Also:
Constant Field Values

QUERY_GET_SCHEDULE_GROUP

public static final String QUERY_GET_SCHEDULE_GROUP
See Also:
Constant Field Values

QUERY_GET_SCHEDULE_GROUP_ADMIN

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

OperationScheduleEntity

protected OperationScheduleEntity()

OperationScheduleEntity

protected OperationScheduleEntity(String jobName,
                                  String jobGroup,
                                  Date nextFireTime)
Method Detail

getJobId

public JobId getJobId()
The single job ID which identifies this specific schedule. It can later be parsed via ScheduleJobId.ScheduleJobId(String).

Returns:
job ID

getJobName

public String getJobName()

setJobName

public void setJobName(String jobName)

getJobGroup

public String getJobGroup()

setJobGroup

public void setJobGroup(String jobGroup)

setNextFireTime

public Long setNextFireTime()
The next time this schedule is going to fire. If null, it won't fire again. Usually, when a next fire time is null, this entity is going to be deleted shortly.

Returns:
next scheduled trigger time, in epoch milliseconds

setNextFireTime

public void setNextFireTime(Long nextFireTime)
Sets the next time this schedule is going to fire.

Parameters:
nextFireTime - next scheduled trigger time, in epoch milliseconds

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


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