| | 103 | |
|---|
| | 104 | public String[] getLocationType(){ |
|---|
| | 105 | return getService().getLocationType(); |
|---|
| | 106 | } |
|---|
| | 107 | |
|---|
| | 108 | public String[] getLocationTypeTable(){ |
|---|
| | 109 | return getService().getLocationTypeTable(); |
|---|
| | 110 | } |
|---|
| | 111 | |
|---|
| | 112 | public void updateLocationTypeTable(String[] comp){ |
|---|
| | 113 | String[] arr = {"Country","State/Province","City/Village","Neighborhood/Cell","County/District","Township/Division","Sub Region","Region","Postal Code","Longitude","Latitude"}; |
|---|
| | 114 | AddressHierarchyType aht = new AddressHierarchyType(); |
|---|
| | 115 | int j=0; |
|---|
| | 116 | for(int i=0;i<arr.length;i++){ |
|---|
| | 117 | aht.setTypeId(i+1); |
|---|
| | 118 | aht.setName(arr[i]); |
|---|
| | 119 | aht.setListorder(Integer.parseInt(comp[j])); |
|---|
| | 120 | j++; |
|---|
| | 121 | aht.setChoice(Integer.parseInt(comp[j])); |
|---|
| | 122 | j++; |
|---|
| | 123 | System.out.println(aht.toString()); |
|---|
| | 124 | try{ |
|---|
| | 125 | getService().updateLocationTypeTable(aht); |
|---|
| | 126 | } |
|---|
| | 127 | catch(Exception e){ |
|---|
| | 128 | e.printStackTrace(); |
|---|
| | 129 | } |
|---|
| | 130 | } |
|---|
| | 131 | |
|---|
| | 132 | } |
|---|
| | 133 | |
|---|
| | 134 | public String[] getAddressHierarchyTypeList(Integer typeid){ |
|---|
| | 135 | String[] arr = getService().getAddressHierarchyTypeList(typeid); |
|---|
| | 136 | return arr; |
|---|
| | 137 | } |
|---|