/** * This method queries the 'node' table for the value of the 'nodelabel' and * 'nodelabelsource' fields for the node with the provided nodeID. A * NodeLabel object is returned initialized with the retrieved values. * * WARNING: A properly instantiated and initialized Vault class object is * required prior to calling this method. This method will initially only be * called from the WEB UI. * * @param nodeID * Unique identifier of the node to be updated. * @return Object containing label and source values. * @throws java.sql.SQLException if any. * * @deprecated Use a {@link NodeDao#load(Integer)} method call instead */ @Override public NodeLabel retrieveLabel(final int nodeID) throws SQLException { final Connection dbConnection = DataSourceFactory.getInstance().getConnection(); final DBUtils d = new DBUtils(NodeLabelJDBCImpl.class, dbConnection); try { return retrieveLabel(nodeID, dbConnection); } finally { d.cleanUp(); } }
/** * <p>getDomain</p> * * @return a {@link java.lang.String} object. */ public String getDomain() { if ("nodeid".equalsIgnoreCase(m_domain)) { return Integer.toString(getIfInfo().getNodeId()); } else if ("nodelabel".equalsIgnoreCase(m_domain)) { try { return new NodeLabelJDBCImpl().retrieveLabel(getIfInfo().getNodeId()).getLabel(); } catch (Throwable e) { return "nodeid-" + Integer.toString(getIfInfo().getNodeId()); } } else { return m_domain; } }