Subversion Repositories SmartDukaan

Rev

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

Rev 4142 Rev 4294
Line 49... Line 49...
49
        }
49
        }
50
 
50
 
51
        return productName.toString();
51
        return productName.toString();
52
    }
52
    }
53
 
53
 
54
    public static String extractProductNameFromItem(Item lineItem) {
54
    public static String extractProductNameFromItem(Item item) {
55
        StringBuilder productName = new StringBuilder();
55
        StringBuilder productName = new StringBuilder();
56
 
56
 
57
        if (lineItem.getBrand() != null && !lineItem.getBrand().isEmpty()) {
57
        if (item.getBrand() != null && !item.getBrand().isEmpty()) {
58
            productName.append(lineItem.getBrand() + " ");
58
            productName.append(item.getBrand() + " ");
59
        }
59
        }
60
 
60
 
61
        if (lineItem.getModelName() != null && !lineItem.getModelName().isEmpty()) {
61
        if (item.getModelName() != null && !item.getModelName().isEmpty()) {
62
            productName.append(lineItem.getModelName()  + " ");
62
            productName.append(item.getModelName() + " ");
63
        }
63
        }
64
 
64
 
65
        if (lineItem.getModelNumber() != null && !lineItem.getModelNumber().isEmpty()) {
65
        if (item.getModelNumber() != null && !item.getModelNumber().isEmpty()) {
66
            productName.append(lineItem.getModelNumber()  + " ");
66
            productName.append(item.getModelNumber() + " ");
-
 
67
        }
-
 
68
        
-
 
69
        if (item.getColor() != null && !item.getColor().isEmpty())	{
-
 
70
        	productName.append(item.getColor());
67
        }
71
        }
68
 
-
 
69
        return productName.toString();
72
        return productName.toString();
70
    }
73
    }
71
 
-
 
72
}
74
}
73
75