org.rhq.core.domain.alert
Class AlertConditionLog

java.lang.Object
  extended by org.rhq.core.domain.alert.AlertConditionLog
All Implemented Interfaces:
Serializable

public class AlertConditionLog
extends Object
implements Serializable

A log record for a triggered alert condition.

See Also:
Serialized Form

Field Summary
static int MAX_LOG_LENGTH
           
static String QUERY_DELETE_BY_ALERT_CTIME
           
static String QUERY_DELETE_BY_RESOURCE
           
static String QUERY_DELETE_BY_RESOURCES
           
static String QUERY_DELETE_UNMATCHED_BY_ALERT_DEFINITION_ID
           
static String QUERY_FIND_UNMATCHED_LOG_BY_ALERT_CONDITION_ID
           
static String QUERY_FIND_UNMATCHED_LOGS_BY_ALERT_DEFINITION_ID
           
static String QUERY_NATIVE_TRUNCATE_SQL
           
 
Constructor Summary
protected AlertConditionLog()
          Creates a new alert condition log record.
  AlertConditionLog(AlertCondition cond, long ctime)
          Creates a new log record for the specified alert condition.
 
Method Summary
 boolean equals(Object obj)
           
 Alert getAlert()
           
 AlertCondition getCondition()
           
 long getCtime()
           
 int getId()
           
 String getValue()
           
 int hashCode()
           
 void setAlert(Alert alert)
           
 void setCondition(AlertCondition condition)
           
 void setCtime(long ctime)
           
 void setValue(String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_UNMATCHED_LOG_BY_ALERT_CONDITION_ID

public static final String QUERY_FIND_UNMATCHED_LOG_BY_ALERT_CONDITION_ID
See Also:
Constant Field Values

QUERY_FIND_UNMATCHED_LOGS_BY_ALERT_DEFINITION_ID

public static final String QUERY_FIND_UNMATCHED_LOGS_BY_ALERT_DEFINITION_ID
See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCE

public static final String QUERY_DELETE_BY_RESOURCE
See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCES

public static final String QUERY_DELETE_BY_RESOURCES
See Also:
Constant Field Values

QUERY_DELETE_BY_ALERT_CTIME

public static final String QUERY_DELETE_BY_ALERT_CTIME
See Also:
Constant Field Values

QUERY_DELETE_UNMATCHED_BY_ALERT_DEFINITION_ID

public static final String QUERY_DELETE_UNMATCHED_BY_ALERT_DEFINITION_ID
See Also:
Constant Field Values

QUERY_NATIVE_TRUNCATE_SQL

public static final String QUERY_NATIVE_TRUNCATE_SQL
See Also:
Constant Field Values

MAX_LOG_LENGTH

public static final int MAX_LOG_LENGTH
See Also:
Constant Field Values
Constructor Detail

AlertConditionLog

protected AlertConditionLog()
Creates a new alert condition log record. (required by EJB3 spec, but not used)


AlertConditionLog

public AlertConditionLog(AlertCondition cond,
                         long ctime)
Creates a new log record for the specified alert condition. The alert that triggered the condition will be filled in later by a separate out-of-band process that ensures all requisite conditions have been satisfied on the corresponding alert.

Parameters:
cond - condition that is being logged
ctime - the time in millis when this condition was known to be true
Method Detail

getId

public int getId()

getCtime

public long getCtime()

setCtime

public void setCtime(long ctime)

getValue

public String getValue()

setValue

public void setValue(String value)

getAlert

public Alert getAlert()

setAlert

public void setAlert(Alert alert)

getCondition

public AlertCondition getCondition()

setCondition

public void setCondition(AlertCondition condition)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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