Skip to content

Instantly share code, notes, and snippets.

@jy2k
Created November 23, 2015 23:46
Show Gist options
  • Save jy2k/1057650728013a759063 to your computer and use it in GitHub Desktop.
Save jy2k/1057650728013a759063 to your computer and use it in GitHub Desktop.
Method get soldier by name
public SoldierDBItem getSoldierByName(String name) throws
SQLException {
QueryBuilder<SoldierDBItem, Integer> qb = getSoldierDao().queryBuilder();
Where where = qb.where();
where.eq(SoldierDBItem.COLUMN_NAME, name);
SoldierDBItem soldierDBItem = qb.queryForFirst();
return soldierDBItem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment