Class AssetModel


  • public class AssetModel
    extends java.lang.Object

    AssetModel class.

    • Constructor Detail

      • AssetModel

        public AssetModel()
    • Method Detail

      • getAsset

        public Asset getAsset​(int nodeId)
                       throws java.sql.SQLException

        getAsset

        Parameters:
        nodeId - a int.
        Returns:
        a Asset object.
        Throws:
        java.sql.SQLException - if any.
      • getAllAssets

        public Asset[] getAllAssets()
                             throws java.sql.SQLException

        getAllAssets

        Returns:
        an array of Asset objects.
        Throws:
        java.sql.SQLException - if any.
      • createAsset

        public void createAsset​(Asset asset)
                         throws java.sql.SQLException

        createAsset

        Parameters:
        asset - a Asset object.
        Throws:
        java.sql.SQLException - if any.
      • modifyAsset

        public void modifyAsset​(Asset asset)
                         throws java.sql.SQLException

        modifyAsset

        Parameters:
        asset - a Asset object.
        Throws:
        java.sql.SQLException - if any.
      • searchAssets

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

        searchAssets

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

        public static AssetModel.MatchingAsset[] searchNodesWithAssets()
                                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • rs2Assets

        protected static Asset[] rs2Assets​(java.sql.ResultSet rs)
                                    throws java.sql.SQLException

        rs2Assets

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

        public static java.lang.String[][] getColumns()

        getColumns

        Returns:
        an array of String objects.