Subversion Repositories SmartDukaan

Rev

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

Rev 22384 Rev 22385
Line 57... Line 57...
57
		}
57
		}
58
		return new JSONObject(JSON.serialize(result));
58
		return new JSONObject(JSON.serialize(result));
59
	}
59
	}
60
 
60
 
61
	public JSONObject getEntityByName(String name) throws Exception {
61
	public JSONObject getEntityByName(String name) throws Exception {
-
 
62
		LOGGER.info("Name --- {}", name);
62
		DB db = contentMongoClient.getDB(CONTENT);
63
		DB db = contentMongoClient.getDB(CONTENT);
63
		DBCollection collection = db.getCollection(SITE_CONTENT);
64
		DBCollection collection = db.getCollection(SITE_CONTENT);
64
		BasicDBObject obj = new BasicDBObject();
65
		BasicDBObject obj = new BasicDBObject();
65
		obj.append("title", name);
66
		obj.append("title", name);
66
		DBObject result = collection.findOne(obj);
67
		DBObject result = collection.findOne(obj);