Package io.openems.backend.metadata.odoo
Class EdgeCache
java.lang.Object
io.openems.backend.metadata.odoo.EdgeCache
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdate
(ResultSet rs) Adds a Edge or Updates an existing Edge from a SQL ResultSet.Gets all Edges as an unmodifiable Collection.getEdgeForApikey
(String apikey) Gets an Edge from its Apikey.getEdgeFromEdgeId
(String edgeId) Gets an Edge from its Edge-ID.getEdgeFromOdooId
(int odooId) Gets an Edge from its Odoo-ID.
-
Field Details
-
EXPECTED_CACHE_SIZE
public static final int EXPECTED_CACHE_SIZE- See Also:
-
-
Constructor Details
-
EdgeCache
-
-
Method Details
-
addOrUpdate
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:
SQLException
- on errorOpenemsException
- on error
-
getEdgeFromEdgeId
Gets an Edge from its Edge-ID.- Parameters:
edgeId
- the Edge-ID- Returns:
- the Edge, or null
-
getEdgeFromOdooId
Gets an Edge from its Odoo-ID.- Parameters:
odooId
- the Odoo-ID- Returns:
- the Edge, or null
-
getEdgeForApikey
Gets an Edge from its Apikey.- Parameters:
apikey
- the Apikey- Returns:
- the Edge, or null
-
getAllEdges
Gets all Edges as an unmodifiable Collection.- Returns:
- a collection of Edges
-