sPFFramework/src/main/java/it/polimi/spf/framework/profile/ProfileTable.java
public boolean hasTag(String tag, SPFPersona persona) {
		SQLiteDatabase db = getReadableDatabase();
		String selection = Contract.COLUMN_VALUE + " LIKE ? AND " + Contract.COLUMN_PERSONA + " = ? ";
		String[] selectionArgs = { "%" + tag + "%", persona.getIdentifier() };
		String[] columns = { Contract.COLUMN_KEY };
		String groupBy = null;
		String having = null;
		String orderBy = null;
		String limit = null;
		Cursor c = db.query(true, // distinct
				Contract.TABLE_PROFILE, // table name
				columns, // projection
				selection, // selection
				selectionArgs, // selection arguments
				groupBy, // don't group the rows
				having, // don't filter by row groups
				orderBy, // don't order by anything
				limit);

		boolean match = c.moveToNext();
		c.close();
		return match;
	}
public boolean hasTag(String tag, SPFPersona persona) {
		SQLiteDatabase db = getReadableDatabase();
		String selection = Contract.COLUMN_VALUE + " LIKE ? AND " + Contract.COLUMN_PERSONA + " = ? ";
		String[] selectionArgs = { "%" + tag + "%", persona.getIdentifier() };
		String[] columns = { Contract.COLUMN_KEY };
		String groupBy = null;
		String having = null;
		String orderBy = null;
		String limit = null;
		Cursor c = db.query(true, // distinct
				Contract.TABLE_PROFILE, // table name
				columns, // projection
				selection, // selection
				selectionArgs, // selection arguments
				groupBy, // don't group the rows
				having, // don't filter by row groups
				orderBy, // don't order by anything
				limit);

		boolean match = c.moveToNext();
		c.close();
		return match;
	}
/** Check if the profile fields of a given SPFPersona contains the
specified tag. Returns true when the tag is contained in at least one
profile field value.

@param tag
@param persona
@return true if the profile contains the tag