Examples of NumberAttributeMarshaller


Examples of com.amazonaws.services.dynamodbv2.datamodeling.ArgumentMarshaller.NumberAttributeMarshaller

                                .formatIso8601Date(((Calendar) obj).getTime()));
                    }
                };
            } else if ( boolean.class.isAssignableFrom(returnType)
                    || Boolean.class.isAssignableFrom(returnType) ) {
                marshaller = new NumberAttributeMarshaller() {

                    @Override
                    public AttributeValue marshall(Object obj) {
                        if ( obj == null || !(Boolean) obj ) {
                            return new AttributeValue().withN("0");
                        } else {
                            return new AttributeValue().withN("1");
                        }
                    }
                };
            } else if ( returnType.isPrimitive() || Number.class.isAssignableFrom(returnType) ) {
                marshaller = new NumberAttributeMarshaller() {

                    @Override
                    public AttributeValue marshall(Object obj) {
                        return new AttributeValue().withN(String.valueOf(obj));
                    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.datamodeling.ArgumentMarshaller.NumberAttributeMarshaller

                                .formatISO8601Date(((Calendar) obj).getTime()));
                    }
                };
            } else if ( boolean.class.isAssignableFrom(returnType)
                    || Boolean.class.isAssignableFrom(returnType) ) {
                marshaller = new NumberAttributeMarshaller() {

                    @Override
                    public AttributeValue marshall(Object obj) {
                        if ( obj == null || !(Boolean) obj ) {
                            return new AttributeValue().withN("0");
                        } else {
                            return new AttributeValue().withN("1");
                        }
                    }
                };
            } else if ( returnType.isPrimitive() || Number.class.isAssignableFrom(returnType) ) {
                marshaller = new NumberAttributeMarshaller() {

                    @Override
                    public AttributeValue marshall(Object obj) {
                        return new AttributeValue().withN(String.valueOf(obj));
                    }
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.