org.rhq.core.domain.event
Class Event

java.lang.Object
  extended by org.rhq.core.domain.event.Event
All Implemented Interfaces:
Serializable

public class Event
extends Object
implements Serializable

A transpired event, pertaining to a particular Resource.

See Also:
Serialized Form

Field Summary
static String DELETE_ALL_BY_RESOURCE
           
static String DELETE_ALL_BY_RESOURCE_GROUP
           
static String DELETE_BY_EVENT_IDS
           
static String DELETE_BY_RESOURCES
           
static int DETAIL_MAX_LENGTH
           
static String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME
           
static String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME_SEVERITY
           
static String FIND_EVENTS_FOR_RESOURCES_AND_TIME
           
static String GET_DETAILS_FOR_EVENT_IDS
           
static String QUERY_EVENT_COUNTS_BY_SEVERITY
           
static String TABLE_NAME
           
 
Constructor Summary
protected Event()
           
  Event(String type, String sourceLocation, long timestamp, EventSeverity severity, String detail)
           
  Event(String type, String sourceLocation, long timestamp, EventSeverity severity, String detail, EventSource source)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDetail()
           
 String getDetailExcerpt()
           
 int getId()
          NOTE: This method is not intended to be called by plugins or the Plugin Container.
 EventSeverity getSeverity()
           
 EventSource getSource()
          NOTE: This method is not intended to be called by plugins or the Plugin Container.
 String getSourceLocation()
           
 long getTimestamp()
           
 String getType()
           
 int hashCode()
           
 void setDetailExcerpt(String detailExcerpt)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_NAME

public static final String TABLE_NAME
See Also:
Constant Field Values

DETAIL_MAX_LENGTH

public static final int DETAIL_MAX_LENGTH
See Also:
Constant Field Values

DELETE_BY_RESOURCES

public static final String DELETE_BY_RESOURCES
See Also:
Constant Field Values

DELETE_BY_EVENT_IDS

public static final String DELETE_BY_EVENT_IDS
See Also:
Constant Field Values

DELETE_ALL_BY_RESOURCE

public static final String DELETE_ALL_BY_RESOURCE
See Also:
Constant Field Values

DELETE_ALL_BY_RESOURCE_GROUP

public static final String DELETE_ALL_BY_RESOURCE_GROUP
See Also:
Constant Field Values

FIND_EVENTS_FOR_RESOURCES_AND_TIME

public static final String FIND_EVENTS_FOR_RESOURCES_AND_TIME
See Also:
Constant Field Values

FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME

public static final String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME
See Also:
Constant Field Values

FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME_SEVERITY

public static final String FIND_EVENTS_FOR_RESOURCE_ID_AND_TIME_SEVERITY
See Also:
Constant Field Values

GET_DETAILS_FOR_EVENT_IDS

public static final String GET_DETAILS_FOR_EVENT_IDS
See Also:
Constant Field Values

QUERY_EVENT_COUNTS_BY_SEVERITY

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

Event

protected Event()

Event

public Event(@NotNull
             String type,
             @NotNull
             String sourceLocation,
             @NotNull
             long timestamp,
             @NotNull
             EventSeverity severity,
             @NotNull
             String detail)
Parameters:
type - the name of the EventDefinition that defines this event's type
timestamp - the date/time this event occurred
severity - the severity of this event
detail - the details of this event

Event

public Event(@NotNull
             String type,
             @NotNull
             String sourceLocation,
             @NotNull
             long timestamp,
             @NotNull
             EventSeverity severity,
             @NotNull
             String detail,
             @Nullable
             EventSource source)
Method Detail

getId

public int getId()
NOTE: This method is not intended to be called by plugins or the Plugin Container.


getSource

@Nullable
public EventSource getSource()
NOTE: This method is not intended to be called by plugins or the Plugin Container.


getType

@Nullable
public String getType()

getSourceLocation

@Nullable
public String getSourceLocation()

getTimestamp

@NotNull
public long getTimestamp()

getSeverity

@NotNull
public EventSeverity getSeverity()

getDetail

@NotNull
public String getDetail()

getDetailExcerpt

public String getDetailExcerpt()

setDetailExcerpt

public void setDetailExcerpt(String detailExcerpt)

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.