Subversion Repositories SmartDukaan

Rev

Rev 19685 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19685 Rev 22388
Line 17... Line 17...
17
     * Get the name of the product from entity. It considers null values also
17
     * Get the name of the product from entity. It considers null values also
18
     * @param expEntity
18
     * @param expEntity
19
     * @return
19
     * @return
20
     */
20
     */
21
	public static String getProductName(Entity expEntity){
21
	public static String getProductName(Entity expEntity){
22
		//FIXME Use stringbuilder
22
		StringBuilder sb = new StringBuilder();
23
		String productName = ((expEntity.getBrand() != null) ? expEntity.getBrand().trim() + " " : "")
23
		sb.append((expEntity.getBrand()!= null) ? expEntity.getBrand() + " " : "")
24
		+ ((expEntity.getModelName() != null) ? expEntity.getModelName().trim() + " " : "")
24
		.append(((expEntity.getModelName() != null) ? expEntity.getModelName() + " " : ""))
25
		+ (( expEntity.getModelNumber() != null ) ? expEntity.getModelNumber().trim() : "" );	
25
		.append((( expEntity.getModelNumber()!= null ) ? expEntity.getModelNumber() : "" ));
26
		return productName;
26
		return sb.toString();
27
	}
27
	}
28
 
28
 
29
	/**
29
	/**
30
	 * Get url of the entity. 
30
	 * Get url of the entity. 
31
	 * @param expEntity
31
	 * @param expEntity