Beispiel #1
0
  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;
  }
Beispiel #2
0
  /*
   * 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;
  }