@Override
    protected String buildSearchQuery() {
        Category cat = (Category) e;

        String query = ""
                + "SELECT * "
                + "FROM category "
                + "WHERE 1=1 ";

        if (cat.getName() != null && !cat.getName().equals("")) {
            query += " AND Name LIKE '%" + cat.getName() + "%' ";
        }

        if (cat.getDesc() != null && !cat.getDesc().equals("")) {
            query += " AND `Desc` LIKE '%" + cat.getDesc() + "%' ";
        }

        if (cat.getDateCreated() != null) {
            query += " AND DateCreated LIKE '" + cat.getDateCreated() + "%' ";
        }

        if (cat.getDateModified() != null) {
            query += " AND _dateModified LIKE '" + cat.getDateModified() + "%' ";
        }

        return query;
    }