I have used the LIKE condition, but it required me to enter the full name into the database to find the name.
LIKE
Instead of
StringBuilder sb = new StringBuilder();
and
sb.append(name + " ");
do
List names = new ArrayList();
names.add(name);