Package org.modeshape.jcr.value

Examples of org.modeshape.jcr.value.BinaryFactory


            try {
                switch (this.type) {
                    case PropertyType.STRING:
                        return this.getString().equals(that.getString());
                    case PropertyType.BINARY:
                        BinaryFactory binaryFactory = factories().getBinaryFactory();
                        BinaryValue thisValue = binaryFactory.create(this.value);
                        BinaryValue thatValue = binaryFactory.create(that.value);
                        return thisValue.equals(thatValue);
                    case PropertyType.BOOLEAN:
                        return this.getBoolean() == that.getBoolean();
                    case PropertyType.DOUBLE:
                        return this.getDouble() == that.getDouble();
View Full Code Here


            } else if (Double[].class.equals(type)) {
                return type.cast(property.getValuesAsArray(context().getValueFactories().getDoubleFactory()));
            } else if (BigDecimal[].class.equals(type)) {
                return type.cast(property.getValuesAsArray(context().getValueFactories().getDecimalFactory()));
            } else if (InputStream[].class.equals(type)) {
                final BinaryFactory binaryFactory = context().getValueFactories().getBinaryFactory();
                InputStream[] result = property.getValuesAsArray(new Property.ValueTypeTransformer<InputStream>() {
                    @Override
                    public InputStream transform( Object value ) {
                        try {
                            BinaryValue binaryValue = binaryFactory.create(value);
                            return binaryValue.getStream();
                        } catch (RepositoryException e) {
                            throw new RuntimeException(e);
                        }
                    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.value.BinaryFactory

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.