public User parseToUser(Object obj) { try { if (Hashtable.class.isInstance(obj)) { return (User) CastTableToObject.getInstance().castByGivenObject((Hashtable) obj, User.class); } else { mLogger.debug("Is No Table: " + obj); } } catch (Exception err) { mLogger.error("[parseToUser]", err); } return null; }
/* * This Illustrates how the Mapping works for Objects manually */ public String setUserObjectByTable(Hashtable t) { try { User user = (User) CastTableToObject.getInstance().castByGivenObject(t, User.class); mLogger.debug("User1: " + user); mLogger.debug("User2: " + user.getUserid()); mLogger.debug("User3: " + user.getUsername()); mLogger.debug("User4: " + user.getOrganisations()); if (user.getOrganisations() != null) { mLogger.debug("User: "******"User: "******"setUserObject " + t); return "got map parameter: " + t; } catch (Exception err) { mLogger.error("setUserObject: ", err); } return null; }