Package com.alvazan.orm.api.z8spi.conv.Converters

Examples of com.alvazan.orm.api.z8spi.conv.Converters.BaseConverter


  @SuppressWarnings("unchecked")
  public static <T> T convertFromBytes(Class<T> clazz, byte[] data) {
    if(data == null)
      return null;
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type not supported at this time="+clazz);   
    return (T) converter.convertFromNoSql(data);
  }
View Full Code Here


   */
  public static byte[] convertToBytes(Object obj) {
    if(obj == null)
      return null;
    Class clazz = obj.getClass();
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type clazz="+clazz+" is not supported at this time");
    return converter.convertToNoSql(obj);
  }
View Full Code Here

      clazz = Double.class;
      Double d = translate(obj);
      value = d;
    }
   
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type not supported at this time="+obj.getClass());
    return converter.convertToNoSql(value);
  }
View Full Code Here

  public static String convertToString(Object data) {
    if(data == null)
      return null;
   
    Class clazz = data.getClass();
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type clazz="+clazz+" is not supported at this time");
    return converter.convertToString(data);
  }
View Full Code Here

 
  @SuppressWarnings("unchecked")
  public static <T> T convertFromString(Class<T> clazz, String data) {
    if(data == null)
      return null;
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type not supported at this time="+clazz);   
    return (T) converter.convertStringToType(data);
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static <T> T convertFromBytes(Class<T> clazz, byte[] data) {
    if(data == null)
      return null;
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type not supported at this time="+clazz);   
    return (T) converter.convertFromNoSql(data);
  }
View Full Code Here

   * @param obj
   * @return
   */
  public static byte[] convertToBytes(Object obj) {
    Class clazz = obj.getClass();
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type clazz="+clazz+" is not supported at this time");
    return converter.convertToNoSql(obj);
  }
View Full Code Here

      clazz = Double.class;
      Double d = translate(obj);
      value = d;
    }
   
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type not supported at this time="+obj.getClass());
    return converter.convertToNoSql(value);
  }
View Full Code Here

    }
  }
 
  public static String convertToString(Object data) {
    Class clazz = data.getClass();
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type clazz="+clazz+" is not supported at this time");
    return converter.convertToString(data);
  }
View Full Code Here

  }
 
  public static Object convertFromString(Class<?> clazz, String data) {
    if(data == null)
      return null;
    BaseConverter converter = stdConverters.get(clazz);
    if(converter == null)
      throw new IllegalArgumentException("Type not supported at this time="+clazz);   
    return converter.convertStringToType(data);
  }
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.z8spi.conv.Converters.BaseConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.