Package org.opennms.web.asset
Class AssetModel
- java.lang.Object
-
- org.opennms.web.asset.AssetModel
-
public class AssetModel extends Object
AssetModel class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAssetModel.MatchingAsset
-
Constructor Summary
Constructors Constructor Description AssetModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateAsset(Asset asset)createAssetAsset[]getAllAssets()getAllAssetsAssetgetAsset(int nodeId)getAssetstatic String[][]getColumns()getColumnsvoidmodifyAsset(Asset asset)modifyAssetprotected static Asset[]rs2Assets(ResultSet rs)rs2Assetsstatic AssetModel.MatchingAsset[]searchAssets(String columnName, String searchText)searchAssetsstatic AssetModel.MatchingAsset[]searchNodesWithAssets()
-
-
-
Method Detail
-
getAsset
public Asset getAsset(int nodeId) throws SQLException
getAsset
- Parameters:
nodeId- a int.- Returns:
- a
Assetobject. - Throws:
SQLException- if any.
-
getAllAssets
public Asset[] getAllAssets() throws SQLException
getAllAssets
- Returns:
- an array of
Assetobjects. - Throws:
SQLException- if any.
-
createAsset
public void createAsset(Asset asset) throws SQLException
createAsset
- Parameters:
asset- aAssetobject.- Throws:
SQLException- if any.
-
modifyAsset
public void modifyAsset(Asset asset) throws SQLException
modifyAsset
- Parameters:
asset- aAssetobject.- Throws:
SQLException- if any.
-
searchAssets
public static AssetModel.MatchingAsset[] searchAssets(String columnName, String searchText) throws SQLException
searchAssets
- Parameters:
columnName- aStringobject.searchText- aStringobject.- Returns:
- an array of
AssetModel.MatchingAssetobjects. - 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- aResultSetobject.- Returns:
- an array of
Assetobjects. - Throws:
SQLException- if any.
-
-