|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.dao.HibernateDAO
org.hyperic.hq.events.server.session.AlertDefinitionDAO
public class AlertDefinitionDAO
Field Summary |
---|
Fields inherited from class org.hyperic.hq.dao.HibernateDAO |
---|
BATCH_SIZE |
Constructor Summary | |
---|---|
AlertDefinitionDAO(DAOFactory f)
|
Method Summary | |
---|---|
java.util.List |
findAllByResource(Resource r)
|
java.util.List |
findAndPrefetchAllDeletedAlertDefs()
Prefetches all collections associated with each alertDef that is deleted and has a null resourceId into ehcache. |
AlertDefinition |
findById(java.lang.Integer id)
|
AlertDefinition |
findById(java.lang.Integer id,
org.hibernate.Session session)
Find an alert definition by Id, loading from the given session. |
java.util.List |
findByResource(Resource res)
|
java.util.List |
findByResource(Resource res,
boolean asc)
|
java.util.List |
findByResourceSortByCtime(Resource res,
boolean asc)
|
java.util.List |
findByRootResource(AuthzSubject subject,
Resource r)
Return all alert definitions for the given resource and its descendants |
AlertDefinition |
findChildAlertDef(Resource res,
java.lang.Integer parentId)
Find the alert def for a given appdef entity and is child of the parent alert def passed in |
AlertDefinition |
findChildAlertDef(Resource res,
java.lang.Integer parentId,
boolean allowStale)
Find the alert def for a given appdef entity that is the child of the parent alert def passed in, allowing for the query to return a stale copy of the alert definition (for efficiency reasons). |
AlertDefinition |
get(java.lang.Integer id)
Find an alert definition by Id, loading from the current session. |
Methods inherited from class org.hyperic.hq.dao.HibernateDAO |
---|
cacheFindAll, createCriteria, createQuery, findAll, findAllOrderByName, findById, findById, flushSession, get, getFactory, getPagedResult, getPagedResult, getPermissionManager, getPersistentClass, getSession, remove, save, size, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlertDefinitionDAO(DAOFactory f)
Method Detail |
---|
public java.util.List findAllByResource(Resource r)
public java.util.List findAndPrefetchAllDeletedAlertDefs()
List
of Integer
of AlertDefintion
idspublic AlertDefinition findChildAlertDef(Resource res, java.lang.Integer parentId)
ent
- Entity to find alert defs forparentId
- ID of the parentpublic AlertDefinition findChildAlertDef(Resource res, java.lang.Integer parentId, boolean allowStale)
ent
- parentId
- allowStale
- true
to allow stale copies of an alert
definition in the query results; false
to
never allow stale copies, potentially always forcing a
sync with the database.
null
.public AlertDefinition findById(java.lang.Integer id)
public AlertDefinition findById(java.lang.Integer id, org.hibernate.Session session)
id
- The alert definition Id.session
- The session to use for loading the alert definition.
org.hibernate.ObjectNotFoundException
- if no alert definition with the give Id exists.public AlertDefinition get(java.lang.Integer id)
id
- The alert definition Id.
null
if no alert definition
exists with the given Id.public java.util.List findByResource(Resource res)
public java.util.List findByResource(Resource res, boolean asc)
public java.util.List findByResourceSortByCtime(Resource res, boolean asc)
public java.util.List findByRootResource(AuthzSubject subject, Resource r)
res
- the root resource
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |