Subversion Repositories SmartDukaan

Rev

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

Rev 22155 Rev 22161
Line 119... Line 119...
119
		DB db = mongo_dtr.getDB(FOFO_DB);
119
		DB db = mongo_dtr.getDB(FOFO_DB);
120
		BasicDBObject filter = new BasicDBObject();
120
		BasicDBObject filter = new BasicDBObject();
121
		filter.append("_id", fofoId);
121
		filter.append("_id", fofoId);
122
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
122
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
123
		DBObject fofoDbOject = collection.findOne(filter);
123
		DBObject fofoDbOject = collection.findOne(filter);
-
 
124
		if(fofoDbOject != null) {
124
		return fofoDbOject.toString();
125
			return fofoDbOject.toString();
-
 
126
		} else {
-
 
127
			return null;
-
 
128
		}
125
	}
129
	}
126
	
130
	
127
	public static String getFofoFormJsonStringByEmail(String email){
131
	public static String getFofoFormJsonStringByEmail(String email){
128
		DB db = mongo_dtr.getDB(FOFO_DB);
132
		DB db = mongo_dtr.getDB(FOFO_DB);
129
		BasicDBObject filter = new BasicDBObject();
133
		BasicDBObject filter = new BasicDBObject();
130
		filter.append("registeredEmail1", email);
134
		filter.append("registeredEmail1", email);
131
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
135
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
132
		DBObject fofoDbOject = collection.findOne(filter);
136
		DBObject fofoDbOject = collection.findOne(filter);
-
 
137
		if(fofoDbOject != null) {
133
		return fofoDbOject.toString();
138
			return fofoDbOject.toString();
-
 
139
		} else {
-
 
140
			return null;
-
 
141
		}
134
	}
142
	}
135
	
143
	
136
	public static String getFofoFormsJsonString(){
144
	public static String getFofoFormsJsonString(){
137
		DB db = mongo_dtr.getDB(FOFO_DB);
145
		DB db = mongo_dtr.getDB(FOFO_DB);
138
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);
146
		DBCollection collection = db.getCollection(FOFO_FORM_COLLECTION);