Examples of BinaryBinding


Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
    }
   
    public void writeCommit(Id id, Commit commit) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        commit.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();

        Connection con = cp.getConnection();
        try {
            PreparedStatement stmt = con
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

            try {
                stmt.setBytes(1, id.getBytes());
                ResultSet rs = stmt.executeQuery();
                if (rs.next()) {
                    ByteArrayInputStream in = new ByteArrayInputStream(rs.getBytes(1));
                    return ChildNodeEntriesMap.deserialize(new BinaryBinding(in));
                } else {
                    throw new NotFoundException(id.toString());
                }
            } finally {
                stmt.close();
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
    }

    public Id writeCNEMap(ChildNodeEntriesMap map) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        map.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();
        byte[] rawId = idFactory.createContentId(bytes);

        Connection con = cp.getConnection();
        try {
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

    }

    @Override
    public void replaceCommit(Id id, Commit commit) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        commit.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();

        Connection con = cp.getConnection();
        try {
            PreparedStatement stmt = con
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        final BasicDBObject nodeObject = (BasicDBObject) nodes.findOne(key);
        if (nodeObject != null) {
            Binding binding;
            if (BINARY_FORMAT) {
                byte[] bytes = (byte[]) nodeObject.get(DATA_FIELD);
                binding = new BinaryBinding(new ByteArrayInputStream(bytes));
            } else {
                binding = new DBObjectBinding(nodeObject);
            }
            node.deserialize(binding);
        } else {
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
    }
   
    public Id writeNode(Node node) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        node.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();
        Id id = new Id(idFactory.createContentId(bytes));

        BasicDBObject nodeObject;
        if (BINARY_FORMAT) {
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
        BasicDBObject commitObject = (BasicDBObject) commits.findOne(key);
        if (commitObject != null) {
            if (BINARY_FORMAT) {
                byte[] bytes = (byte[]) commitObject.get(DATA_FIELD);
                return StoredCommit.deserialize(id, new BinaryBinding(new ByteArrayInputStream(bytes)));
            } else {
                return StoredCommit.deserialize(id, new DBObjectBinding(commitObject));
            }
        } else {
            throw new NotFoundException(id.toString());
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
    }

    public void writeCommit(Id id, Commit commit) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        commit.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();

        BasicDBObject commitObject;
        if (BINARY_FORMAT) {
            commitObject = new BasicDBObject(ID_FIELD, id.getBytes()).append(DATA_FIELD, bytes);
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
        BasicDBObject mapObject = (BasicDBObject) cneMaps.findOne(key);
        if (mapObject != null) {
            if (BINARY_FORMAT) {
                byte[] bytes = (byte[]) mapObject.get(DATA_FIELD);
                return ChildNodeEntriesMap.deserialize(new BinaryBinding(new ByteArrayInputStream(bytes)));
            } else {
                return ChildNodeEntriesMap.deserialize(new DBObjectBinding(mapObject));
            }
        } else {
            throw new NotFoundException(id.toString());
View Full Code Here

Examples of org.apache.jackrabbit.mk.store.BinaryBinding

        }
    }

    public Id writeCNEMap(ChildNodeEntriesMap map) throws Exception {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        map.serialize(new BinaryBinding(out));
        byte[] bytes = out.toByteArray();
        Id id = new Id(idFactory.createContentId(bytes));

        BasicDBObject mapObject;
        if (BINARY_FORMAT) {
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.