public Record findByColumn(String columnKey, String value, boolean forUpdate) {
return getRow(mTableName, columnKey, value, forUpdate);
}
private Record getRow(String tableName, String columnKey, String value, boolean forUpdate) {
Record oldRow = null;
try {
String statement = "SELECT * FROM " + tableName;
statement += " WHERE " + columnKey + " = ?";
if (forUpdate) statement += " FOR UPDATE";