Subversion Repositories SmartDukaan

Rev

Rev 21920 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21920 Rev 21974
Line 98... Line 98...
98
			ffList.add(convertJSONToPojo(dbc.next().toString()));
98
			ffList.add(convertJSONToPojo(dbc.next().toString()));
99
		}
99
		}
100
		return ffList;
100
		return ffList;
101
	}
101
	}
102
	
102
	
103
	public static FofoForm getFofoForm(int fofoId) {
103
	public static String getFofoFormJsonStringByFofoId(int fofoId){
104
		DB db = mongo.getDB(FOFO_DB);
104
		DB db = mongo.getDB(FOFO_DB);
105
		BasicDBObject filter = new BasicDBObject();
105
		BasicDBObject filter = new BasicDBObject();
106
		filter.append("_id", fofoId);
106
		filter.append("_id", fofoId);
107
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
107
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
108
		DBObject fofoDbOject = collection.find(filter).one();
108
		DBObject fofoDbOject = collection.find(filter).one();
-
 
109
		return fofoDbOject.toString();
-
 
110
	}
-
 
111
	
-
 
112
	public static FofoForm getFofoForm(int fofoId) {
-
 
113
		String fofoFormJsonString = getFofoFormJsonStringByFofoId(fofoId);
109
		System.out.println(fofoDbOject.toString());
114
		System.out.println(fofoFormJsonString);
110
		return new Gson().fromJson(fofoDbOject.toString(), FofoForm.class);
115
		return new Gson().fromJson(fofoFormJsonString, FofoForm.class);
111
		//return convertJSONToPojo(fofoDbOject.toString());
116
		//return convertJSONToPojo(fofoDbOject.toString());
112
	}
117
	}
113
	
118
	
114
	private static FofoForm convertJSONToPojo(String json){
119
	private static FofoForm convertJSONToPojo(String json){
115
 
120