Code example for SQLiteStatement

Methods: bindLongclearBindingsexecuteInsert

0
	} 
 
	@Override 
	public long save(Round round) {
		if (round.getId() == 0) {
			insertStatement.clearBindings();
			insertStatement.bindLong(1, round.getNumberOfCards());
			insertStatement.bindLong(2, round.getMatchId());
			round.setId(insertStatement.executeInsert());
		} else { 
			this.update(round);
		} 
 
		return round.getId();
	} 
 
	@Override 
	public void update(Round round) {
		db.update(RoundTable.NAME, toContentValues(round), BaseColumns._ID
				+ " = ?", new String[] { String.valueOf(round.getId()) });
Stop searching for code, let great code find you!  Add Codota to your java IDE