Subversion Repositories SmartDukaan

Rev

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

Rev 21727 Rev 22067
Line 1... Line 1...
1
package com.spice.profitmandi.dao.util;
1
package com.spice.profitmandi.dao.util;
2
 
2
 
3
import org.apache.commons.lang.StringUtils;
-
 
4
 
-
 
5
import com.google.gson.Gson;
3
import com.google.gson.Gson;
6
import com.spice.profitmandi.dao.model.ContentPojo;
4
import com.spice.profitmandi.dao.model.ContentPojo;
7
import com.spice.profitmandi.dao.model.ProductPojo;
5
import com.spice.profitmandi.dao.model.ProductPojo;
8
import com.spice.profitmandi.dao.repository.dtr.Mongo;
6
import com.spice.profitmandi.dao.repository.dtr.Mongo;
9
 
7
 
Line 23... Line 21...
23
		}
21
		}
24
		try {
22
		try {
25
			pp = new ProductPojo();
23
			pp = new ProductPojo();
26
			pp.setId(entityId);
24
			pp.setId(entityId);
27
			pp.setDefaultImgUrl(cp.getDefaultImageUrl());
25
			pp.setDefaultImgUrl(cp.getDefaultImageUrl());
28
			pp.setDescription(StringUtils.join(cp.getKeySpecs().subList(0, Math.min(cp.getKeySpecs().size(), 3)),", "));
26
			pp.setDescription(String.join(", ", cp.getKeySpecs().subList(0, Math.min(cp.getKeySpecs().size(), 3))));
29
			pp.setImageUrl(cp.getIconImageUrl());
27
			pp.setImageUrl(cp.getIconImageUrl());
30
			pp.setUrl(cp.getUrl());
28
			pp.setUrl(cp.getUrl());
31
			pp.setTitle(cp.getTitle());
29
			pp.setTitle(cp.getTitle());
32
		} catch (Exception e) {
30
		} catch (Exception e) {
33
			e.printStackTrace();
31
			e.printStackTrace();