Package siena.core

Examples of siena.core.DecimalPrecision.storageType()


        return Types.DECIMAL;
      }
      else {
        if(an.storageType() == DecimalPrecision.StorageType.NATIVE){
          return Types.DECIMAL;
        }else if(an.storageType() == DecimalPrecision.StorageType.STRING) {
          return Types.VARCHAR;
        }else if(an.storageType() == DecimalPrecision.StorageType.DOUBLE) {
          return Types.DOUBLE;         
        }else {
          return Types.DECIMAL;
View Full Code Here


      else {
        if(an.storageType() == DecimalPrecision.StorageType.NATIVE){
          return Types.DECIMAL;
        }else if(an.storageType() == DecimalPrecision.StorageType.STRING) {
          return Types.VARCHAR;
        }else if(an.storageType() == DecimalPrecision.StorageType.DOUBLE) {
          return Types.DOUBLE;         
        }else {
          return Types.DECIMAL;
        }
      }
View Full Code Here

      DecimalPrecision an = field.getAnnotation(DecimalPrecision.class);
      if(an == null) {
        ps.setObject(index, value);
      }
      else {
        if(an.storageType() == DecimalPrecision.StorageType.NATIVE){
          ps.setBigDecimal(index, (BigDecimal)value);
        }else if(an.storageType() == DecimalPrecision.StorageType.STRING) {
          ps.setString(index, ((BigDecimal)value).toPlainString());
        }else if(an.storageType() == DecimalPrecision.StorageType.DOUBLE) {
          ps.setDouble(index, ((BigDecimal)value).doubleValue());
View Full Code Here

        ps.setObject(index, value);
      }
      else {
        if(an.storageType() == DecimalPrecision.StorageType.NATIVE){
          ps.setBigDecimal(index, (BigDecimal)value);
        }else if(an.storageType() == DecimalPrecision.StorageType.STRING) {
          ps.setString(index, ((BigDecimal)value).toPlainString());
        }else if(an.storageType() == DecimalPrecision.StorageType.DOUBLE) {
          ps.setDouble(index, ((BigDecimal)value).doubleValue());
        }else {
          ps.setBigDecimal(index, (BigDecimal)value);
View Full Code Here

      else {
        if(an.storageType() == DecimalPrecision.StorageType.NATIVE){
          ps.setBigDecimal(index, (BigDecimal)value);
        }else if(an.storageType() == DecimalPrecision.StorageType.STRING) {
          ps.setString(index, ((BigDecimal)value).toPlainString());
        }else if(an.storageType() == DecimalPrecision.StorageType.DOUBLE) {
          ps.setDouble(index, ((BigDecimal)value).doubleValue());
        }else {
          ps.setBigDecimal(index, (BigDecimal)value);
        }
      }
View Full Code Here

          else if(BigDecimal.class == type){
            DecimalPrecision ann = field.getAnnotation(DecimalPrecision.class);
            if(ann == null) {
              value = (BigDecimal)value;
            }else {
              switch(ann.storageType()){
              case DOUBLE:
                value = ((BigDecimal)value).doubleValue();
                break;
              case STRING:
                value = ((BigDecimal)value).toPlainString();
View Full Code Here

    if(BigDecimal.class == type){
      DecimalPrecision ann = field.getAnnotation(DecimalPrecision.class);
      if(ann==null){
        return (BigDecimal)value;
      }else {
        switch(ann.storageType()){
        case DOUBLE:
          return BigDecimal.valueOf((Double)value);
        case STRING:
          return new BigDecimal((String)value);
        case NATIVE:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.