Examples of BigDecimalWrapperImpl


Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        @Override
        protected Object valueFromRaw(Object raw) {
            Long lval = (Long)raw;
            BigDecimal decimal = new BigDecimal(BigInteger.valueOf(lval), getDecimalScale());
            return new BigDecimalWrapperImpl(decimal);
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

            ByteString bytes = (ByteString)raw;
            int precision = type.attribute(DecimalAttribute.PRECISION);
            int scale = type.attribute(DecimalAttribute.SCALE);
            StringBuilder sb = new StringBuilder();
            ConversionHelperBigDecimal.decodeToString(bytes.toByteArray(), 0, precision, scale, AkibanAppender.of(sb));
            return new BigDecimalWrapperImpl(sb.toString());
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

                    else
                        value.putInt64((Long) obj);
                } else if (obj instanceof String) {
                    value.putString((String) obj, null);
                } else if (obj instanceof BigDecimal) {
                    value.putObject(new BigDecimalWrapperImpl((BigDecimal) obj));
                } else {
                    fail();
                }
            }
            return row;
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        }

        @Override
        public void doEvaluate(TExecutionContext context, ValueSource source, ValueTarget target)
        {
            target.putObject(new BigDecimalWrapperImpl(source.getInt8()));
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        }

        @Override
        public void doEvaluate(TExecutionContext context, ValueSource source, ValueTarget target)
        {
            target.putObject(new BigDecimalWrapperImpl(source.getInt16()));
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        }

        @Override
        public void doEvaluate(TExecutionContext context, ValueSource source, ValueTarget target)
        {
            target.putObject(new BigDecimalWrapperImpl(source.getInt32()));
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        }

        @Override
        public void doEvaluate(TExecutionContext context, ValueSource source, ValueTarget target)
        {
            target.putObject(new BigDecimalWrapperImpl(source.getInt64()));
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        @Override
        public void doEvaluate(TExecutionContext context, ValueSource source, ValueTarget target)
        {
            String asString = UnsignedLongs.toString(source.getInt64());
            target.putObject(new BigDecimalWrapperImpl(asString));
        }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

        byte[] bytes = source.getBytes();
        int precision = type.attribute(DecimalAttribute.PRECISION);
        int scale = type.attribute(DecimalAttribute.SCALE);
        StringBuilder sb = new StringBuilder();
        ConversionHelperBigDecimal.decodeToString(bytes, 0, precision, scale, AkibanAppender.of(sb));
        return new BigDecimalWrapperImpl(sb.toString());
    }
View Full Code Here

Examples of com.foundationdb.server.types.common.BigDecimalWrapperImpl

    }

    public static BigDecimalWrapper getWrapper(TExecutionContext context, int index) {
        BigDecimalWrapper wrapper = (BigDecimalWrapper)context.exectimeObjectAt(index);
        if (wrapper == null) {
            wrapper = new BigDecimalWrapperImpl();
            context.putExectimeObject(index, wrapper);
        }
        wrapper.reset();
        return wrapper;
    }
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.