@Override public DbRow primaryKeyQuery(String tableName, Object primaryKeyValue) throws JuDbException { String selectQry = "SELECT * FROM " + tableName + " WHERE " + this.dbConnection.getPrimaryColumnName(tableName) + "=?"; DbRows dbRows = this.query(selectQry, primaryKeyValue); if (dbRows.getRowCount() > 1) { throw new JuDbException("PrimaryKeyQuery for " + tableName + " with key=" + primaryKeyValue + ". Expected exactly 1 row, but got " + dbRows.getRowCount()); } return dbRows.getRowCount() == 0 ? null : dbRows.getRow(0); }