PlatformDAO (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.appdef.server.session.PlatformDAO class

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.appdef.server.session
Class PlatformDAO

    java.lang.Object
      org.hyperic.hq.dao.HibernateDAO
          org.hyperic.hq.appdef.server.session.PlatformDAO

    public class PlatformDAO

extends HibernateDAO

Field Summary

Fields inherited from class org.hyperic.hq.dao.HibernateDAO
`BATCH_SIZE`

Constructor Summary
`PlatformDAO(DAOFactory f)`

Method Summary
`java.util.Collection` | `findAll_orderCTime(boolean asc)`
`java.util.Collection` | `findAll_orderName(boolean asc)`
`java.util.Collection` | `findByAgent(Agent agt)`
`java.util.Collection` | `findByAgentToken(java.lang.String token)`
`java.util.Collection` | `findByApplication(Application app)`
`Platform` | `findByCertDN(java.lang.String dn, java.lang.String type)`
`java.util.Collection` | `findByCTime(long ctime)`
`Platform` | `findByFQDN(java.lang.String fqdn)`
`Platform` | `findById(java.lang.Integer id)`
`java.util.Collection` | `findByIpAddr(java.lang.String addr)`
`java.util.Collection` | `findByMacAddr(java.lang.String macAddress)`
`Platform` | `findByName(java.lang.String name)`
`java.util.Collection` | `findByNameOrFQDN(java.lang.String name, java.lang.String fqdn)`
`java.util.List` | `findByNoNetworkRelation(java.util.List platformTypeIds, java.lang.String platformName)`
`java.util.List` | `findByServers(java.lang.Integer[] ids)`
`Platform` | `findByServiceId(java.lang.Integer id)`
`Platform` | `findBySortName(java.lang.String name)`
`java.util.List` | `findByType(java.lang.Integer pid)`
`java.util.List` | `findByTypeAndRegEx(java.lang.Integer pType, java.lang.String regex)`
`java.util.Collection` | `findDeletedPlatforms()`
`java.util.List` | `findParentByNetworkRelation(java.util.List platformTypeIds, java.lang.String platformName, java.lang.Boolean hasChildren)`
`Resource` | `findVirtualByInstanceId(java.lang.Integer id)`
`java.util.Collection` | `findVirtualByPhysicalId(java.lang.Integer id)`
`java.util.Collection` | `findVirtualByProcessId(java.lang.Integer id)`
`Platform` | `get(java.lang.Integer id)`
`java.lang.Number` | `getCpuCount()`
`java.lang.Number` | `getPlatformCount()`
`java.util.List` | `getPlatformTypeCounts()`
`void` | `remove(Ip ip)`
`void` | `remove(Platform entity)`
`void` | `save(Platform entity)`
`void` | `updatePlatform(Platform platform, PlatformValue existing)` A method to update a platform based on a PlatformValue object Ideally, this should be done via the xdoclet generated setPlatformValue method, however, since this method is generated incorrectly, and doesnt support CMR's reliably, I'm rolling my own here.

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

### PlatformDAO

    public PlatformDAO(DAOFactory f)

Method Detail

### findById

    public Platform findById(java.lang.Integer id)

### get

    public Platform get(java.lang.Integer id)

### save

    public void save(Platform entity)

### remove

    public void remove(Platform entity)

### remove

    public void remove(Ip ip)

### updatePlatform

    public void updatePlatform(Platform platform,
                               PlatformValue existing)

  A method to update a platform based on a PlatformValue object Ideally, this should be done via the xdoclet generated setPlatformValue method, however, since this method is generated incorrectly, and doesnt support CMR's reliably, I'm rolling my own here. IMPORTANT: due to a bug in the value objects, this method expects any IP's you wish to save (even existing ones) to be inside the "addedIpValues" collection. This means you should removeAllIpValues(), then add them individually. This is a workaround until the xdoclet stuff is made to work. Legacy code from EJB entity bean. All this logic should move close to the modification source. Should pass the pojo directly instead of using Platform Value object.

  Parameters:
    `existing` - - a platform value object.

### findByFQDN

    public Platform findByFQDN(java.lang.String fqdn)

### findByNameOrFQDN

    public java.util.Collection findByNameOrFQDN(java.lang.String name,
                                                 java.lang.String fqdn)

### findAll_orderName

    public java.util.Collection findAll_orderName(boolean asc)

### findAll_orderCTime

    public java.util.Collection findAll_orderCTime(boolean asc)

### findByCTime

    public java.util.Collection findByCTime(long ctime)

### findByName

    public Platform findByName(java.lang.String name)

### findBySortName

    public Platform findBySortName(java.lang.String name)

### findByTypeAndRegEx

    public java.util.List findByTypeAndRegEx(java.lang.Integer pType,
                                             java.lang.String regex)

### findParentByNetworkRelation

    public java.util.List findParentByNetworkRelation(java.util.List platformTypeIds,
                                                      java.lang.String platformName,
                                                      java.lang.Boolean hasChildren)

### findByNoNetworkRelation

    public java.util.List findByNoNetworkRelation(java.util.List platformTypeIds,
                                                  java.lang.String platformName)

### findByType

    public java.util.List findByType(java.lang.Integer pid)

### findByServers

    public java.util.List findByServers(java.lang.Integer[] ids)

### findByServiceId

    public Platform findByServiceId(java.lang.Integer id)

### findByCertDN

    public Platform findByCertDN(java.lang.String dn,
                                 java.lang.String type)

### findByApplication

    public java.util.Collection findByApplication(Application app)

### findByAgent

    public java.util.Collection findByAgent(Agent agt)

### findByAgentToken

    public java.util.Collection findByAgentToken(java.lang.String token)

### findByIpAddr

    public java.util.Collection findByIpAddr(java.lang.String addr)

### findByMacAddr

    public java.util.Collection findByMacAddr(java.lang.String macAddress)

### findVirtualByInstanceId

    public Resource findVirtualByInstanceId(java.lang.Integer id)

### findVirtualByProcessId

    public java.util.Collection findVirtualByProcessId(java.lang.Integer id)

### findVirtualByPhysicalId

    public java.util.Collection findVirtualByPhysicalId(java.lang.Integer id)

### getPlatformTypeCounts

    public java.util.List getPlatformTypeCounts()

### getPlatformCount

    public java.lang.Number getPlatformCount()

### getCpuCount

    public java.lang.Number getCpuCount()

### findDeletedPlatforms

    public java.util.Collection findDeletedPlatforms()

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.