org.opennms.web.asset
Class AssetModel

java.lang.Object
  extended by org.opennms.web.asset.AssetModel

public class AssetModel
extends Object

AssetModel class.


Nested Class Summary
static class AssetModel.MatchingAsset
           
 
Constructor Summary
AssetModel()
           
 
Method Summary
 void createAsset(Asset asset)
          createAsset
 Asset[] getAllAssets()
          getAllAssets
 Asset getAsset(int nodeId)
          getAsset
static String[][] getColumns()
          getColumns
 void modifyAsset(Asset asset)
          modifyAsset
protected static Asset[] rs2Assets(ResultSet rs)
          rs2Assets
static AssetModel.MatchingAsset[] searchAssets(String columnName, String searchText)
          searchAssets
static AssetModel.MatchingAsset[] searchNodesWithAssets()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetModel

public AssetModel()
Method Detail

getAsset

public Asset getAsset(int nodeId)
               throws SQLException

getAsset

Parameters:
nodeId - a int.
Returns:
a Asset object.
Throws:
SQLException - if any.

getAllAssets

public Asset[] getAllAssets()
                     throws SQLException

getAllAssets

Returns:
an array of Asset objects.
Throws:
SQLException - if any.

createAsset

public void createAsset(Asset asset)
                 throws SQLException

createAsset

Parameters:
asset - a Asset object.
Throws:
SQLException - if any.

modifyAsset

public void modifyAsset(Asset asset)
                 throws SQLException

modifyAsset

Parameters:
asset - a Asset object.
Throws:
SQLException - if any.

searchAssets

public static AssetModel.MatchingAsset[] searchAssets(String columnName,
                                                      String searchText)
                                               throws SQLException

searchAssets

Parameters:
columnName - a String object.
searchText - a String object.
Returns:
an array of AssetModel.MatchingAsset objects.
Throws:
SQLException - if any.

searchNodesWithAssets

public static AssetModel.MatchingAsset[] searchNodesWithAssets()
                                                        throws SQLException
Throws:
SQLException

rs2Assets

protected static Asset[] rs2Assets(ResultSet rs)
                            throws SQLException

rs2Assets

Parameters:
rs - a ResultSet object.
Returns:
an array of Asset objects.
Throws:
SQLException - if any.

getColumns

public static String[][] getColumns()

getColumns

Returns:
an array of String objects.


Copyright © 2011. All Rights Reserved.