Code example for SQLiteStatement

Methods: bindLongbindStringclearBindingsexecuteInsert

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