Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## org.hyperic.hq.events.server.session
Class AlertDefinitionDAO

    java.lang.Object
      org.hyperic.hq.dao.HibernateDAO
          org.hyperic.hq.events.server.session.AlertDefinitionDAO

    public class AlertDefinitionDAO

extends HibernateDAO

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

### AlertDefinitionDAO

    public AlertDefinitionDAO(DAOFactory f)

Method Detail

### findAllByResource

    public java.util.List findAllByResource(Resource r)

### findAndPrefetchAllDeletedAlertDefs

    public java.util.List findAndPrefetchAllDeletedAlertDefs()

  Prefetches all collections associated with each alertDef that is deleted and has a null resourceId into ehcache.

  Returns:
    `List` of `Integer` of `AlertDefintion` ids

### findChildAlertDef

    public 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

  Parameters:
    `ent` - Entity to find alert defs for
    `parentId` - ID of the parent

### findChildAlertDef

    public 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).

  Parameters:
    `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.
  Returns:
    The alert definition or `null`.

### findById

    public AlertDefinition findById(java.lang.Integer id)

### findById

    public AlertDefinition findById(java.lang.Integer id,
                                    org.hibernate.Session session)

  Find an alert definition by Id, loading from the given session.

  Parameters:
    `id` - The alert definition Id.
    `session` - The session to use for loading the alert definition.
  Returns:
    The alert definition.
  Throws:
    `org.hibernate.ObjectNotFoundException` - if no alert definition with the give Id exists.

### get

    public AlertDefinition get(java.lang.Integer id)

  Find an alert definition by Id, loading from the current session.

  Parameters:
    `id` - The alert definition Id.
  Returns:
    The alert definition or `null` if no alert definition exists with the given Id.

### findByResource

    public java.util.List findByResource(Resource res)

### findByResource

    public java.util.List findByResource(Resource res,
                                         boolean asc)

### findByResourceSortByCtime

    public java.util.List findByResourceSortByCtime(Resource res,
                                                    boolean asc)

### findByRootResource

    public java.util.List findByRootResource(AuthzSubject subject,
                                             Resource r)

  Return all alert definitions for the given resource and its descendants

  Parameters:
    `res` - the root resource
  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.