use of org.apache.qpid.server.protocol.v1_0.LinkDefinition in project qpid-broker-j by apache.
the class JDBCLinkStore method doDeleteLink.
@Override
protected void doDeleteLink(final LinkDefinition<Source, Target> link) throws StoreException {
try (Connection connection = getConnection();
PreparedStatement preparedStatement = connection.prepareStatement(String.format("DELETE FROM %s WHERE link_key = ?", getLinksTableName()))) {
preparedStatement.setString(1, generateLinkKey(link));
preparedStatement.execute();
} catch (SQLException e) {
throw new StoreException(String.format("Cannot delete link %s", new LinkKey(link)), e);
}
}
Aggregations