예제 #1
0
 /**
  * Converts a Object into a big decimal. If the Object is a date, its time value is used to create
  * the number. If the Object is a Number, the double value is used. As last try the Object is
  * converted into a String and this String is parsed into a BigDecimal. If this failed,
  * BidgDecimal (0) is returned.
  */
 public BigDecimal convertNativeToNumber(tsColumn coldef, Object o) throws tinySQLException {
   return ParserUtils.convertToNumber(o);
 }
예제 #2
0
 /**
  * returns a object into a boolean. Returns true, if the Object is a boolean value containing
  * Boolean.TRUE or a string containing "true"
  *
  * @returns Boolean.TRUE or Boolean.FALSE
  */
 public Boolean convertNativeToBoolean(tsColumn coldef, Object o) throws tinySQLException {
   return ParserUtils.convertToBoolean(o);
 }
예제 #3
0
 /**
  * Converts a Object into a java.sql.Timestamp. If the Object is a Date, Number or a String of the
  * form yyyy-MM-dd hh:mm:ss, the conversion will return a new Timestamp, else null is returned.
  *
  * @returns the converted timestamp or null
  */
 public Timestamp convertNativeToTimestamp(tsColumn coldef, Object o) throws tinySQLException {
   return ParserUtils.convertToTimestamp(o);
 }
예제 #4
0
 /**
  * converts a object into a string. if the object is null, <code>null</code> is returned. This
  * functions handles Time, sql.Date und util.Date specially. If o is a byte or char array, a
  * string is formed using the usual string constructors.
  *
  * @returns a string representation of the object or null
  */
 public String convertNativeToString(tsColumn coldef, Object o) throws tinySQLException {
   return ParserUtils.convertToString(o);
 }
예제 #5
0
 /**
  * Converts a Object into a java.sql.Date. If the Object is a Date, Number or a String of the form
  * yyyy-MM-dd, the conversion will return a new Date, else null is returned.
  *
  * @returns the converted date or null
  */
 public Date convertNativeToDate(tsColumn coldef, Object o) throws tinySQLException {
   return ParserUtils.convertToDate(o);
 }