Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.authz.server.session
Class ResourceDAO

java.lang.Object
  extended by org.hyperic.hq.dao.HibernateDAO
      extended by org.hyperic.hq.authz.server.session.ResourceDAO

public class ResourceDAO
extends HibernateDAO


Field Summary
 
Fields inherited from class org.hyperic.hq.dao.HibernateDAO
BATCH_SIZE
 
Constructor Summary
ResourceDAO(DAOFactory f)
           
 
Method Summary
 java.util.List findAllResourcesInstancesForOperation(int opId)
          Returns an ordered list of instance IDs for a given operation.
 Resource findById(java.lang.Integer id)
           
 Resource findByInstanceId(java.lang.Integer typeId, java.lang.Integer id)
           
 Resource findByInstanceId(java.lang.Integer typeId, java.lang.Integer id, boolean allowStale)
          Find a Resource by type Id and instance Id, allowing for the query to return a stale copy of the resource (for efficiency reasons).
 Resource findByInstanceId(ResourceType type, java.lang.Integer id)
           
 java.util.Collection findByOwner(AuthzSubject owner)
           
 java.util.Collection findByOwnerAndType(AuthzSubject owner, ResourceType type)
           
 java.util.List findByResource(AuthzSubject subject, Resource r)
           
 java.util.Collection findInGroup_orderName(java.lang.Integer groupId, java.lang.Boolean fSystem)
           
 java.util.Collection findInGroupAuthz_orderName(java.lang.Integer userId, java.lang.Integer groupId, java.lang.Boolean fSystem)
           
 Resource findRootResource()
           
 java.util.Collection findScopeByOperationBatch(AuthzSubject subjLoc, Resource[] resLocArr, Operation[] opLocArr)
           
 java.util.Collection findSvcRes_orderName(java.lang.Boolean fSystem)
           
 java.util.Collection findViewableSvcRes_orderName(java.lang.Integer user, java.lang.Boolean fSystem)
           
 Resource get(java.lang.Integer id)
           
 boolean isOwner(Resource entity, java.lang.Integer possibleOwner)
           
 void remove(Resource entity)
           
 void save(Resource entity)
           
 
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

ResourceDAO

public ResourceDAO(DAOFactory f)
Method Detail

findRootResource

public Resource findRootResource()

findById

public Resource findById(java.lang.Integer id)

get

public Resource get(java.lang.Integer id)

save

public void save(Resource entity)

remove

public void remove(Resource entity)

isOwner

public boolean isOwner(Resource entity,
                       java.lang.Integer possibleOwner)

findByInstanceId

public Resource findByInstanceId(ResourceType type,
                                 java.lang.Integer id)

findByInstanceId

public Resource findByInstanceId(java.lang.Integer typeId,
                                 java.lang.Integer id)

findByInstanceId

public Resource findByInstanceId(java.lang.Integer typeId,
                                 java.lang.Integer id,
                                 boolean allowStale)
Find a Resource by type Id and instance Id, allowing for the query to return a stale copy of the resource (for efficiency reasons).

Parameters:
typeId - The type Id.
id - The instance Id.
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 Resource.

findByResource

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

findByOwner

public java.util.Collection findByOwner(AuthzSubject owner)

findByOwnerAndType

public java.util.Collection findByOwnerAndType(AuthzSubject owner,
                                               ResourceType type)

findViewableSvcRes_orderName

public java.util.Collection findViewableSvcRes_orderName(java.lang.Integer user,
                                                         java.lang.Boolean fSystem)

findSvcRes_orderName

public java.util.Collection findSvcRes_orderName(java.lang.Boolean fSystem)

findInGroupAuthz_orderName

public java.util.Collection findInGroupAuthz_orderName(java.lang.Integer userId,
                                                       java.lang.Integer groupId,
                                                       java.lang.Boolean fSystem)

findInGroup_orderName

public java.util.Collection findInGroup_orderName(java.lang.Integer groupId,
                                                  java.lang.Boolean fSystem)

findScopeByOperationBatch

public java.util.Collection findScopeByOperationBatch(AuthzSubject subjLoc,
                                                      Resource[] resLocArr,
                                                      Operation[] opLocArr)

findAllResourcesInstancesForOperation

public java.util.List findAllResourcesInstancesForOperation(int opId)
Returns an ordered list of instance IDs for a given operation.


Hyperic HQ Plugin API v. 4.4.0.2

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