private String whereRestriction(String dbColumnName, Object value) {

        if (value instanceof Date) {
            return dbColumnName + "='" + DaoUtils.DATE_FORMATTER.format(value)
                + "'";
        } else if (value instanceof String) {
            return dbColumnName + " LIKE '" + value + "'";
        } else if (value.getClass().isEnum()) {
            return dbColumnName + "='" + EnumUtils.getId(value) + "'";
        } else {
            value = value.toString()
                .replaceAll("'", "''");

            return dbColumnName + "='" + value + "'";
        }
    }