Subversion Repositories SmartDukaan

Rev

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

Rev 33888 Rev 33916
Line 108... Line 108...
108
    @Override
108
    @Override
109
    public int hashCode() {
109
    public int hashCode() {
110
        return Objects.hash(id, brandId, brand, modelNumber, modelName, categoryId, createdBy, created);
110
        return Objects.hash(id, brandId, brand, modelNumber, modelName, categoryId, createdBy, created);
111
    }
111
    }
112
 
112
 
-
 
113
    public String getDescription() {
-
 
114
        StringBuilder itemString = new StringBuilder();
-
 
115
        if (this.getBrand() != null && !this.getBrand().isEmpty()) {
-
 
116
            itemString.append(this.getBrand().trim());
-
 
117
        }
-
 
118
        itemString.append(" ");
-
 
119
        if (this.getModelName() != null && !this.getModelName().isEmpty()) {
-
 
120
            itemString.append(this.getModelName().trim());
-
 
121
        }
-
 
122
        if (this.getModelNumber() != null && !this.getModelNumber().isEmpty()) {
-
 
123
            itemString.append(" ");
-
 
124
            itemString.append(this.getModelNumber().trim());
-
 
125
        }
-
 
126
 
-
 
127
        return itemString.toString().replaceAll("\\s+", " ").trim();
-
 
128
    }
-
 
129
 
113
    @Override
130
    @Override
114
    public String toString() {
131
    public String toString() {
115
        return "Catalog{" +
132
        return "Catalog{" +
116
                "id=" + id +
133
                "id=" + id +
117
                ", brandId=" + brandId +
134
                ", brandId=" + brandId +