Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.dao
Class HibernateDAO

java.lang.Object
  extended by org.hyperic.hq.dao.HibernateDAO
Direct Known Subclasses:
ActionDAO, AgentDAO, AgentReportStatusDAO, AgentTypeDAO, AIHistoryDAO, AIIpDAO, AIPlatformDAO, AIScheduleDAO, AIServerDAO, AIServiceDAO, AlertActionLogDAO, AlertConditionDAO, AlertConditionLogDAO, AlertDAO, AlertDefinitionDAO, ApplicationDAO, ApplicationTypeDAO, AppServiceDAO, AppSvcDependencyDAO, AuditDAO, AvailabilityDataDAO, BaselineDAO, CalendarDAO, CalendarEntryDAO, CategoryDAO, ConfigPropertyDAO, ConfigResponseDAO, ControlHistoryDAO, ControlScheduleDAO, CpropDAO, CpropKeyDAO, CrispoDAO, CrispoOptionDAO, EventLogDAO, ExecutionStrategyTypeInfoDAO, MeasurementDAO, MeasurementTemplateDAO, MetricAuxLogDAO, MetricProblemDAO, MonitorableTypeDAO, OperationDAO, PlatformDAO, PlatformTypeDAO, PluginDAO, PrincipalDAO, ResourceAuxLogDAO, ResourceDAO, ResourceEdgeDAO, ResourceGroupDAO, ResourceRelationDAO, ResourceTypeDAO, RoleDAO, ScheduleRevNumDAO, ServerDAO, ServerTypeDAO, ServiceDAO, ServiceTypeDAO, TriggerDAO, UpdateStatusDAO, VirtualDAO

public abstract class HibernateDAO
extends java.lang.Object

Hibernate Data Access Object The actual DAO is subclass of this object. This class should actually be implemented with J2SE 5 Generics, but we have to support JDK 1.4, :(


Field Summary
protected static int BATCH_SIZE
           
 
Constructor Summary
protected HibernateDAO(java.lang.Class persistentClass, DAOFactory f)
           
 
Method Summary
protected  boolean cacheFindAll()
          This method is intended for sub-classes to specify whether or not their 'find-all' finder should be automatically added to the query-cache.
protected  org.hibernate.Criteria createCriteria()
           
protected  org.hibernate.Query createQuery(java.lang.String s)
           
 java.util.List findAll()
           
 java.util.Collection findAllOrderByName()
           
protected  java.lang.Object findById(java.io.Serializable id)
           
protected  java.lang.Object findById(java.io.Serializable id, boolean lock)
           
 void flushSession()
           
protected  java.lang.Object get(java.io.Serializable id)
           
 DAOFactory getFactory()
           
protected  PageList getPagedResult(org.hibernate.Criteria crit, java.lang.Integer total, PageControl pc)
           
protected  PageList getPagedResult(org.hibernate.Query q, java.lang.Integer total, PageControl pc)
           
protected  PermissionManager getPermissionManager()
           
 java.lang.Class getPersistentClass()
           
 org.hibernate.Session getSession()
           
protected  void remove(java.lang.Object entity)
           
protected  void save(java.lang.Object entity)
           
 int size()
           
 int size(java.util.Collection coll)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_SIZE

protected static final int BATCH_SIZE
See Also:
Constant Field Values
Constructor Detail

HibernateDAO

protected HibernateDAO(java.lang.Class persistentClass,
                       DAOFactory f)
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()

getSession

public org.hibernate.Session getSession()

getFactory

public DAOFactory getFactory()

flushSession

public void flushSession()

findById

protected java.lang.Object findById(java.io.Serializable id)

get

protected java.lang.Object get(java.io.Serializable id)

findById

protected java.lang.Object findById(java.io.Serializable id,
                                    boolean lock)

createCriteria

protected org.hibernate.Criteria createCriteria()

createQuery

protected org.hibernate.Query createQuery(java.lang.String s)

cacheFindAll

protected boolean cacheFindAll()
This method is intended for sub-classes to specify whether or not their 'find-all' finder should be automatically added to the query-cache. The findAll query will use the persistent class specified in the constructor, and use the following cache region: com.my.Persistent.findAll

Returns:
true to indicate that the finder should be cached

findAll

public java.util.List findAll()

findAllOrderByName

public java.util.Collection findAllOrderByName()

size

public int size()

size

public int size(java.util.Collection coll)

save

protected void save(java.lang.Object entity)

remove

protected void remove(java.lang.Object entity)

getPagedResult

protected PageList getPagedResult(org.hibernate.Query q,
                                  java.lang.Integer total,
                                  PageControl pc)

getPagedResult

protected PageList getPagedResult(org.hibernate.Criteria crit,
                                  java.lang.Integer total,
                                  PageControl pc)

getPermissionManager

protected PermissionManager getPermissionManager()

Hyperic HQ Plugin API v. 4.4.0.2

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