Subversion Repositories SmartDukaan

Rev

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

Rev 29264 Rev 29350
Line 16... Line 16...
16
	private static final Gson gs = new Gson();
16
	private static final Gson gs = new Gson();
17
 
17
 
18
	private static final Logger LOGGER = LogManager.getLogger(CustomTransactionConvertorUtil.class);
18
	private static final Logger LOGGER = LogManager.getLogger(CustomTransactionConvertorUtil.class);
19
 
19
 
20
	@Autowired
20
	@Autowired
21
	private Mongo mongoClient;
21
	private Mongo contentMongoClient;
22
 
22
 
23
	public ProductPojo getShortContent(long entityId) {
23
	public ProductPojo getShortContent(long entityId) {
24
		ContentPojo cp = null;
24
		ContentPojo cp = null;
25
		ProductPojo pp = null;
25
		ProductPojo pp = null;
26
		try {
26
		try {
27
			cp = gs.fromJson(mongoClient.getEntityById(entityId).toString(), ContentPojo.class);
27
			cp = gs.fromJson(contentMongoClient.getEntityById(entityId).toString(), ContentPojo.class);
28
		} catch (Exception e) {
28
		} catch (Exception e) {
29
			// e.printStackTrace();
29
			// e.printStackTrace();
30
			return null;
30
			return null;
31
		}
31
		}
32
 
32
 
Line 62... Line 62...
62
	public ProductPojo getShortContent(String name) {
62
	public ProductPojo getShortContent(String name) {
63
		ContentPojo cp = null;
63
		ContentPojo cp = null;
64
		ProductPojo pp = null;
64
		ProductPojo pp = null;
65
 
65
 
66
		try {
66
		try {
67
			cp = mongoClient.getEntityByName(name);
67
			cp = contentMongoClient.getEntityByName(name);
68
		} catch (Exception e) {
68
		} catch (Exception e) {
69
			e.printStackTrace();
69
			e.printStackTrace();
70
			return null;
70
			return null;
71
		}
71
		}
72
		try {
72
		try {