public Map<String, Object> toMap(Object source) {
		Map<String, Object> objectAsMap = new HashMap<String, Object>();
		Method[] methods = source.getClass().getMethods();
		for (Method m : methods) {
			if (m.getName().startsWith("set")) {
				String attName = m.getName().substring(3);
				Method getter = null;
				try {
					getter = source.getClass().getMethod("get" + attName);
					
				} catch (NoSuchMethodException e) {
					try {
						getter = source.getClass().getMethod("is" + attName);
					} catch (NoSuchMethodException ex) {
					}
				}
				if (getter != null) {
					Object val = null;
					try {
						val = getter.invoke(source);
					} catch (IllegalAccessException e) {
						// TODO Auto-generated catch block
						throw new RuntimeException(e);
					} catch (IllegalArgumentException e) {
						// TODO Auto-generated catch block
						throw new RuntimeException(e);
					} catch (InvocationTargetException e) {
						// TODO Auto-generated catch block
						throw new RuntimeException(e);
					}
					char charAt = attName.charAt(0);
					String key = attName.replaceFirst(charAt + "",
							(charAt + "").toLowerCase());
					objectAsMap.put(key, val);
				}
			}
		}
		return objectAsMap;

	}