1 16 package org.apache.myfaces.examples.listexample; 17 18 import java.io.Serializable ; 19 import java.math.BigDecimal ; 20 import java.util.List ; 21 import java.util.Arrays ; 22 import java.util.Collections ; 23 24 29 public class SimpleCountry 30 implements Serializable 31 { 32 private long _id; 33 private String _name; 34 private String _isoCode; 35 private BigDecimal _size; 36 private boolean _remove = false; 37 private List _cities; 38 39 public SimpleCountry(long id, String name, String isoCode, BigDecimal size, String [] cities) 40 { 41 _id = id; 42 _name = name; 43 _isoCode = isoCode; 44 _size = size; 45 46 if(cities!=null) 47 _cities = Arrays.asList(cities); 48 else 49 _cities = Collections.EMPTY_LIST; 50 } 51 52 public long getId() 53 { 54 return _id; 55 } 56 57 public String getName() 58 { 59 return _name; 60 } 61 62 public String getIsoCode() 63 { 64 return _isoCode; 65 } 66 67 public BigDecimal getSize() 68 { 69 return _size; 70 } 71 72 public List getCities() 73 { 74 return _cities; 75 } 76 77 public void setId(long id) 78 { 79 _id = id; 80 } 81 82 public void setIsoCode(String isoCode) 83 { 84 _isoCode = isoCode; 85 } 86 87 public void setName(String name) 88 { 89 _name = name; 90 } 91 92 public void setSize(BigDecimal size) 93 { 94 _size = size; 95 } 96 97 public boolean isRemove() 98 { 99 return _remove; 100 } 101 102 public void setRemove(boolean remove) 103 { 104 _remove = remove; 105 } 106 } 107 | Popular Tags |