Subversion Repositories SmartDukaan

Rev

Rev 21873 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21873 Rev 21875
Line 28... Line 28...
28
			logger.error("Unable to get State Info Map", e);
28
			logger.error("Unable to get State Info Map", e);
29
		}
29
		}
30
	}
30
	}
31
 
31
 
32
	public static Map<Long, StateInfo> getStateIdMap() {
32
	public static Map<Long, StateInfo> getStateIdMap() {
33
		if (stateIdMap != null) {
33
		if (stateIdMap == null) {
34
			try {
34
			try {
35
				in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = new InventoryClient().getClient();
35
				in.shop2020.model.v1.inventory.InventoryService.Client inventoryClient = new InventoryClient().getClient();
36
				stateIdMap = Collections.unmodifiableMap(inventoryClient.getStateMaster());
36
				stateIdMap = Collections.unmodifiableMap(inventoryClient.getStateMaster());
37
 
37
 
38
			} catch (Exception e) {
38
			} catch (Exception e) {
Line 42... Line 42...
42
		
42
		
43
		return stateIdMap;
43
		return stateIdMap;
44
	}
44
	}
45
	
45
	
46
	public static List<Supplier> getSuppliers() {
46
	public static List<Supplier> getSuppliers() {
47
		if (suppliers != null) {
47
		if (suppliers == null) {
48
			try {
48
			try {
49
	            Client purchaseClient = new PurchaseClient().getClient();
49
	            Client purchaseClient = new PurchaseClient().getClient();
50
	            suppliers = purchaseClient.getAllSuppliers();
50
	            suppliers = purchaseClient.getAllSuppliers();
51
	        } catch (Exception e) {
51
	        } catch (Exception e) {
52
	            logger.error("Error loading suppliers", e);
52
	            logger.error("Error loading suppliers", e);