class ToolDao extends NamedParameterJdbcDaoSupport {

    @Transactional(propagation = Propagation.MANDATORY)
    public void createTool(Tool tool) {
        Assert.isNull(loadTool(tool.getRegistryId(), tool.getImage()),
                messageHelper.getMessage(MessageConstants.ERROR_TOOL_ALREADY_EXIST, tool.getRegistry(), tool.getImage())
        );
        tool.setId(daoHelper.createId(toolSequence));
        getNamedParameterJdbcTemplate().update(createToolQuery, getParameters(tool, getConnection()));
    }

}