Subversion Repositories SmartDukaan

Rev

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

Rev 32230 Rev 32417
Line 62... Line 62...
62
    private Double weight;
62
    private Double weight;
63
 
63
 
64
    @Column(name = "category")
64
    @Column(name = "category")
65
    private int categoryId;
65
    private int categoryId;
66
 
66
 
-
 
67
 
67
    @Column(name = "startDate")
68
    @Column(name = "startDate")
68
    private LocalDateTime startDate;
69
    private LocalDateTime startDate;
69
 
70
 
-
 
71
    @Column(name = "addedOn")
-
 
72
    private LocalDateTime addedOn;
-
 
73
 
-
 
74
    @Column(name = "updatedOn")
-
 
75
    private LocalDateTime updatedOn;
-
 
76
 
-
 
77
    private boolean risky;
-
 
78
 
-
 
79
    private int expectedDelay;
-
 
80
 
-
 
81
    @Column(name = "warranty_period")
-
 
82
    private Integer warrantyPeriod;
-
 
83
 
-
 
84
    private Integer preferredVendor;
-
 
85
 
70
    public int getCategoryId() {
86
    public int getCategoryId() {
71
        return categoryId;
87
        return categoryId;
72
    }
88
    }
73
 
89
 
74
    public void setCategoryId(int categoryId) {
90
    public void setCategoryId(int categoryId) {
75
        this.categoryId = categoryId;
91
        this.categoryId = categoryId;
76
    }
92
    }
77
 
93
 
-
 
94
    public LocalDateTime getAddedOn() {
-
 
95
        return addedOn;
-
 
96
    }
-
 
97
 
-
 
98
    public void setAddedOn(LocalDateTime addedOn) {
-
 
99
        this.addedOn = addedOn;
-
 
100
    }
-
 
101
 
-
 
102
    public LocalDateTime getUpdatedOn() {
-
 
103
        return updatedOn;
-
 
104
    }
-
 
105
 
-
 
106
    public void setUpdatedOn(LocalDateTime updatedOn) {
-
 
107
        this.updatedOn = updatedOn;
-
 
108
    }
-
 
109
 
-
 
110
    public boolean isRisky() {
-
 
111
        return risky;
-
 
112
    }
-
 
113
 
-
 
114
    public void setRisky(boolean risky) {
-
 
115
        this.risky = risky;
-
 
116
    }
-
 
117
 
-
 
118
    public int getExpectedDelay() {
-
 
119
        return expectedDelay;
-
 
120
    }
-
 
121
 
-
 
122
    public void setExpectedDelay(int expectedDelay) {
-
 
123
        this.expectedDelay = expectedDelay;
-
 
124
    }
-
 
125
 
-
 
126
    public Integer getWarrantyPeriod() {
-
 
127
        return warrantyPeriod;
-
 
128
    }
-
 
129
 
-
 
130
    public void setWarrantyPeriod(Integer warrantyPeriod) {
-
 
131
        this.warrantyPeriod = warrantyPeriod;
-
 
132
    }
-
 
133
 
-
 
134
    public Integer getPreferredVendor() {
-
 
135
        return preferredVendor;
-
 
136
    }
-
 
137
 
-
 
138
    public void setPreferredVendor(Integer preferredVendor) {
-
 
139
        this.preferredVendor = preferredVendor;
-
 
140
    }
-
 
141
 
78
    @Enumerated(EnumType.STRING)
142
    @Enumerated(EnumType.STRING)
79
    @Column(name = "type")
143
    @Column(name = "type")
80
    private ItemType type;
144
    private ItemType type;
81
 
145
 
82
    @Column(name = "hsnCode")
146
    @Column(name = "hsnCode")
Line 307... Line 371...
307
            if (other.weight != null) return false;
371
            if (other.weight != null) return false;
308
        } else if (!weight.equals(other.weight)) return false;
372
        } else if (!weight.equals(other.weight)) return false;
309
        return true;
373
        return true;
310
    }
374
    }
311
 
375
 
312
    @Override
-
 
313
    public String toString() {
-
 
314
        return "Item [id=" + id + ", brand=" + brand + ", status=" + status + ", productGroup=" + productGroup + ", modelName=" + modelName + ", modelNumber=" + modelNumber + ", color=" + color + ", catalogItemId=" + catalogItemId + ", weight=" + weight + ", categoryId=" + categoryId + ", startDate=" + startDate + ", type=" + type + ", hsnCode=" + hsnCode + ", sellingPrice=" + sellingPrice + "]";
-
 
315
    }
-
 
316
 
-
 
317
    public status getStatus() {
376
    public status getStatus() {
318
        return status;
377
        return status;
319
    }
378
    }
320
 
379
 
321
    public void setStatus(status status) {
380
    public void setStatus(status status) {
Line 328... Line 387...
328
            return lowerCaseColor.equals("any color") || lowerCaseColor.equals("f_any color") || lowerCaseColor.equals("any colour") || lowerCaseColor.equals("f_any colour");
387
            return lowerCaseColor.equals("any color") || lowerCaseColor.equals("f_any color") || lowerCaseColor.equals("any colour") || lowerCaseColor.equals("f_any colour");
329
        }
388
        }
330
        return false;
389
        return false;
331
    }
390
    }
332
 
391
 
-
 
392
    public Item clone() {
-
 
393
        Item item = new Item();
-
 
394
        item.setBrand(this.getBrand());
-
 
395
        item.setModelName(this.getModelName());
-
 
396
        item.setModelNumber(this.getModelNumber());
-
 
397
        item.setColor(this.getColor());
-
 
398
        item.setCatalogItemId(this.catalogItemId);
-
 
399
        item.setHsnCode(this.getHsnCode());
-
 
400
        item.setCategoryId(this.getCategoryId());
-
 
401
        item.setMrp(this.getMrp());
-
 
402
        item.setProductGroup(this.getProductGroup());
-
 
403
        item.setSellingPrice(this.getSellingPrice());
-
 
404
        item.setStartDate(LocalDateTime.now());
-
 
405
        item.setStatus(this.getStatus());
-
 
406
        item.setType(this.getType());
-
 
407
        item.setWeight(this.getWeight());
-
 
408
        item.setAddedOn(LocalDateTime.now());
-
 
409
        item.setUpdatedOn(LocalDateTime.now());
-
 
410
        item.setExpectedDelay(0);
-
 
411
        item.setPreferredVendor(null);
-
 
412
        item.setRisky(true);
-
 
413
        item.setWarrantyPeriod(0);
-
 
414
        return item;
-
 
415
    }
-
 
416
 
333
    public Float getMrp() {
417
    public Float getMrp() {
334
        return mrp;
418
        return mrp;
335
    }
419
    }
336
 
420
 
337
    public void setMrp(Float mrp) {
421
    public void setMrp(Float mrp) {
338
        this.mrp = mrp;
422
        this.mrp = mrp;
339
    }
423
    }
-
 
424
 
-
 
425
    @Override
-
 
426
    public String toString() {
-
 
427
        return "Item{" +
-
 
428
                "id=" + id +
-
 
429
                ", brand='" + brand + '\'' +
-
 
430
                ", status=" + status +
-
 
431
                ", productGroup='" + productGroup + '\'' +
-
 
432
                ", modelName='" + modelName + '\'' +
-
 
433
                ", modelNumber='" + modelNumber + '\'' +
-
 
434
                ", color='" + color + '\'' +
-
 
435
                ", catalogItemId=" + catalogItemId +
-
 
436
                ", weight=" + weight +
-
 
437
                ", categoryId=" + categoryId +
-
 
438
                ", startDate=" + startDate +
-
 
439
                ", addedOn=" + addedOn +
-
 
440
                ", updatedOn=" + updatedOn +
-
 
441
                ", risky=" + risky +
-
 
442
                ", expectedDelay=" + expectedDelay +
-
 
443
                ", warrantyPeriod=" + warrantyPeriod +
-
 
444
                ", preferredVendor=" + preferredVendor +
-
 
445
                ", type=" + type +
-
 
446
                ", hsnCode='" + hsnCode + '\'' +
-
 
447
                ", sellingPrice=" + sellingPrice +
-
 
448
                ", mrp=" + mrp +
-
 
449
                '}';
-
 
450
    }
340
}
451
}
341
452