Examples of BasicSingleValueProperty


Examples of org.jboss.dna.graph.property.basic.BasicSingleValueProperty

     * @see Location#with(UUID)
     */
    @Override
    public Location with( UUID uuid ) {
        if (uuid == null) return this;
        Property newProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        if (this.hasIdProperties()) {
            Property existing = this.getIdProperty(DnaLexicon.UUID);
            if (existing != null && existing.equals(newProperty)) return this;
        }

View Full Code Here

Examples of org.jboss.dna.graph.property.basic.BasicSingleValueProperty

    LocationWithPathAndUuid( Path path,
                             UUID uuid ) {
        assert path != null;
        assert uuid != null;
        this.path = path;
        this.idProperties = Collections.singletonList((Property)new BasicSingleValueProperty(DnaLexicon.UUID, uuid));

        // Paths are immutable, Properties are immutable, the idProperties list
        // is wrapped in an unmodifiableList by the Location factory methods...
        // ... so we can cache the hash code.
        hashCode = HashCode.compute(this.path, idProperties);
View Full Code Here

Examples of org.jboss.dna.graph.property.basic.BasicSingleValueProperty

     * @see Location#with(UUID)
     */
    @Override
    public Location with( UUID uuid ) {
        if (uuid == null) return this;
        Property newProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        if (this.hasIdProperties()) {
            Property existing = this.getIdProperty(DnaLexicon.UUID);
            if (existing != null && existing.equals(newProperty)) return this;
        }

View Full Code Here

Examples of org.jboss.dna.graph.property.basic.BasicSingleValueProperty

        Property idProperty = idProperties.get(0); // fast
        if (DnaLexicon.UUID.equals(idProperty.getName())) {
            return new LocationWithUuid(uuid);
        }
        List<Property> newIdProperties = new ArrayList<Property>(idProperties.size() + 1);
        newIdProperties.add(new BasicSingleValueProperty(DnaLexicon.UUID, uuid));
        newIdProperties.addAll(idProperties);
        return new LocationWithProperties(newIdProperties);
    }
View Full Code Here

Examples of org.modeshape.jcr.value.basic.BasicSingleValueProperty

    public DocumentWriter addProperty( Name name,
                                       Object value ) {
        if (value == null) {
            return this;
        }
        translator.setProperty(federatedDocument, new BasicSingleValueProperty(name, value), null, null);
        return this;
    }
View Full Code Here

Examples of org.modeshape.jcr.value.basic.BasicSingleValueProperty

                                       Object[] values ) {
        if (values == null) return this;
        int len = values.length;
        if (len == 0) return this;
        if (len == 1) {
            translator.setProperty(federatedDocument, new BasicSingleValueProperty(name, values[0]), null, null);
        } else {
            translator.setProperty(federatedDocument, new BasicMultiValueProperty(name, values), null, null);
        }
        return this;
    }
View Full Code Here

Examples of org.modeshape.jcr.value.basic.BasicSingleValueProperty

    @Override
    public DocumentWriter addProperty( Name name,
                                       Object firstValue,
                                       Object... additionalValues ) {
        if (additionalValues.length == 0) {
            translator.setProperty(federatedDocument, new BasicSingleValueProperty(name, firstValue), null, null);
        } else {
            List<Object> values = new ArrayList<Object>(1 + additionalValues.length);
            values.add(firstValue);
            for (Object value : additionalValues) {
                values.add(value);
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.