Class EdgeCache


  • public class EdgeCache
    extends java.lang.Object
    • Constructor Detail

    • Method Detail

      • addOrUpate

        public MyEdge addOrUpate​(java.sql.ResultSet rs)
                          throws java.sql.SQLException,
                                 OpenemsException
        Adds a Edge or Updates an existing Edge from a SQL ResultSet.
        Parameters:
        rs - the ResultSet record
        Returns:
        the new or updated Edge instance
        Throws:
        java.sql.SQLException - on error
        OpenemsException - on error
      • getEdgeFromEdgeId

        public MyEdge getEdgeFromEdgeId​(java.lang.String edgeId)
        Gets an Edge from its Edge-ID.
        Parameters:
        edgeId - the Edge-ID
        Returns:
        the Edge, or null
      • getEdgeFromOdooId

        public MyEdge getEdgeFromOdooId​(int odooId)
        Gets an Edge from its Odoo-ID.
        Parameters:
        odooId - the Odoo-ID
        Returns:
        the Edge, or null
      • getEdgeForApikey

        public MyEdge getEdgeForApikey​(java.lang.String apikey)
        Gets an Edge from its Apikey.
        Parameters:
        apikey - the Apikey
        Returns:
        the Edge, or null
      • getAllEdges

        public java.util.Collection<Edge> getAllEdges()
        Gets all Edges as an unmodifiable Collection.
        Returns:
        a collection of Edges