Projects >> BBC-News-Reader >>1a5c62bd7e69985a8b9fc1412729b7288aba98d2

Chunk
Conflicting content
	   ContentValues cv=null;
	   if(cursor.getCount()==0)
	   {
<<<<<<< HEAD
		   if(recent){
			   cv=new ContentValues(4);
			   cv.put("title",title);
			   cv.put("description",description);
			   cv.put("link",link);
	   {
			   cv.put("pubdate",timestamp);
			   long rowid=db.insert(TABLE_NAME, null, cv);
			   cursor=db.query(false,TABLE_NAME,new String[]{"item_Id"},"rowid=?",new String[] {Long.toString(rowid)},null,null,null, null);
			   
			   cursor.moveToNext();
			   itemId=cursor.getInt(0);
			   cv=new ContentValues(2);
			   cv.put("categoryName",category);
			   cv.put("itemId",itemId);
			   db.insert(TABLE3_NAME, null, cv);
		   }
=======
		   cv=new ContentValues(4);
		   cv.put("title",title);
		   cv.put("description",description);
		   cv.put("link",link);
		   cv.put("pubdate",timestamp);
		   long rowid=db.insert(ITEM_TABLE, null, cv);
		   cursor=db.query(false,ITEM_TABLE,new String[]{"item_Id"},"rowid=?",new String[] {Long.toString(rowid)},null,null,null, null);
		   
		   cursor.moveToNext();
		   itemId=cursor.getInt(0);
		   cv=new ContentValues(2);
		   cv.put("categoryName",category);
		   cv.put("itemId",itemId);
		   db.insert(ITEM_CATEGORY_TABLE, null, cv);
>>>>>>> 726213186ae45f1d0465a3f3c9788cc0a22b0e91
	   }
	   else
Solution content
	   ContentValues cv=null;
	   if(cursor.getCount()==0)
	   {
		   if(recent){
			   cv=new ContentValues(4);
			   cv.put("title",title);
			   cv.put("description",description);
			   cv.put("link",link);
			   cv.put("pubdate",timestamp);
			   long rowid=db.insert(ITEM_TABLE, null, cv);
			   cursor=db.query(false,ITEM_TABLE,new String[]{"item_Id"},"rowid=?",new String[] {Long.toString(rowid)},null,null,null, null);
			   
			   cursor.moveToNext();
			   itemId=cursor.getInt(0);
			   cv=new ContentValues(2);
			   cv.put("categoryName",category);
			   cv.put("itemId",itemId);
			   db.insert(ITEM_CATEGORY_TABLE, null, cv);
		   }
	   }
	   else
	   {
File
DatabaseHandler.java
Developer's decision
Combination
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
		   itemIdQuery+=(" OR item_Id='"+cursor.getString(0)+"'");
	   }
	   //Query the items table to get a the rows with that category
<<<<<<< HEAD
	   //then fill the String[][] and return it
	   cursor=db.query(TABLE_NAME,new String[]{"title", "description", "link", "item_Id"},itemIdQuery,null,null,null,"pubdate desc");
=======
	   //then fill the String[][] and return it
	   cursor=db.query(ITEM_TABLE,new String[]{"title", "description", "link", "item_Id"},itemIdQuery,null,null,null,"pubdate desc");
>>>>>>> 726213186ae45f1d0465a3f3c9788cc0a22b0e91
	   String[][] items=new String[4][cursor.getCount()];
	   for(int i=1;i<=cursor.getCount();i++)
	   {
Solution content
		   itemIdQuery+=(" OR item_Id='"+cursor.getString(0)+"'");
	   }
	   //Query the items table to get a the rows with that category
	   //then fill the String[][] and return it
	   cursor=db.query(ITEM_TABLE,new String[]{"title", "description", "link", "item_Id"},itemIdQuery,null,null,null,"pubdate desc");
	   String[][] items=new String[4][cursor.getCount()];
	   for(int i=1;i<=cursor.getCount();i++)
	   {
File
DatabaseHandler.java
Developer's decision
Version 2
Kind of conflict
Comment
Method invocation
Variable