Subversion Repositories SmartDukaan

Rev

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

Rev 762 Rev 822
Line 109... Line 109...
109
			}
109
			}
110
		}
110
		}
111
		return obj;
111
		return obj;
112
	}
112
	}
113
	
113
	
-
 
114
	public static boolean validatePin(String pincode) {
-
 
115
		int pin;
-
 
116
		try {
-
 
117
			pin = Integer.parseInt(pincode);
-
 
118
		}
-
 
119
		catch (NumberFormatException e) {
-
 
120
			return false;
-
 
121
		}
-
 
122
		
-
 
123
		if (pin < 100000 || pin > 999999) {
-
 
124
			return false;
-
 
125
		}
-
 
126
		return true;
-
 
127
	}
-
 
128
 
-
 
129
	public static boolean validatePhone(String phone) {
-
 
130
		try {
-
 
131
    		Long.parseLong(phone);
-
 
132
		}
-
 
133
		catch (NumberFormatException e) {
-
 
134
			return false;
-
 
135
		}
-
 
136
		return true;
-
 
137
	}
-
 
138
 
-
 
139
	
114
//	public static void main(String args[]) throws Exception{
140
//	public static void main(String args[]) throws Exception{
115
//		// to store categories
141
//		// to store categories
116
//		Map<Long, Category> categories = new HashMap<Long, Category>();
142
//		Map<Long, Category> categories = new HashMap<Long, Category>();
117
//		Map<Long, in.shop2020.metamodel.definitions.Category> cmsCategories = Catalog.getInstance().getDefinitionsContainer().getCategories();
143
//		Map<Long, in.shop2020.metamodel.definitions.Category> cmsCategories = Catalog.getInstance().getDefinitionsContainer().getCategories();
118
//		for(in.shop2020.metamodel.definitions.Category cmsCategory: cmsCategories.values()){
144
//		for(in.shop2020.metamodel.definitions.Category cmsCategory: cmsCategories.values()){