code: public static Map<String, Object> serializeToMap( Object entity )
    {
      IObjectSerializer serializer = getSerializer( entity.getClass() );
      return (Map<String, Object>) serializer.serializeToMap( entity, new HashMap<Object, Map<String, Object>>() );
    }
docs: Serializes Object to Map using WebOrb's serializer.
  
  @param entity object to be serialized
  @return Map corresponding to given Object