001 package org.springframework.richclient.samples.dataeditor.domain; 002 003 public class Item implements Comparable<Item> 004 { 005 private String name; 006 private String description; 007 private Supplier supplier; 008 009 public Item() 010 { 011 } 012 013 public Item(String descriptiom, String name, Supplier supplier) 014 { 015 this.description = descriptiom; 016 this.name = name; 017 this.supplier = supplier; 018 } 019 020 public String getDescription() 021 { 022 return description; 023 } 024 025 public void setDescription(String description) 026 { 027 this.description = description; 028 } 029 030 public String getName() 031 { 032 return name; 033 } 034 035 public void setName(String name) 036 { 037 this.name = name; 038 } 039 040 public Supplier getSupplier() 041 { 042 return supplier; 043 } 044 045 public void setSupplier(Supplier supplier) 046 { 047 this.supplier = supplier; 048 } 049 050 public int compareTo(Item o) 051 { 052 return getName().compareTo(o.getName()); 053 } 054 }