Package org.apache.isis.objectstore.nosql

Examples of org.apache.isis.objectstore.nosql.NoSqlStoreException


        // TODO deal with buffer overrun
        while ((c = input.read()) != ' ' && c != '\n' && c != -1) {
            buffer[i++] = (byte) c;
        }
        if (i == 0) {
            throw new NoSqlStoreException("No data read from " + input);
        }
        final String read = new String(buffer, 0, i);
        LOG.debug("read " + read);
        return read;
    }
View Full Code Here


                this.header = 0;
                return true;
            }
        } catch (final IOException e) {
            logFailure();
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

                logFailure();
                throw new RemotingException("command didn't end with an empty blank line, aborting request");
            }
        } catch (final IOException e) {
            logFailure();
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

                final int length = fileInput.read(buffer);
                final byte[] key = new byte[length];
                System.arraycopy(buffer, 0, key, 0, length);
                return key;
            } catch (final IOException e) {
                throw new NoSqlStoreException("Failed to read in encryption file: " + file.getAbsolutePath(), e);
            }
        } else {
            throw new NoSqlStoreException("Cannot find encryption file: " + file.getAbsolutePath());
        }
    }
View Full Code Here

    public StateWriter addAggregate(final String id) {
        final JsonStateWriter jsonStateWriter = new JsonStateWriter();
        try {
            dbObject.put(id, jsonStateWriter.dbObject);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
        return jsonStateWriter;
    }
View Full Code Here

    @Override
    public void writeField(final String id, final String data) {
        try {
            dbObject.put(id, data == null ? JSONObject.NULL : data);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

    @Override
    public void writeField(final String id, final long l) {
        try {
            dbObject.put(id, Long.toString(l));
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

    public String getData() {
        try {
            return dbObject.toString(4);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

            collection.add(((JsonStateWriter) writer).dbObject);
        }
        try {
            dbObject.put(id, collection);
        } catch (final JSONException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

    public JsonStateReader(final String data) {
        try {
            final JSONObject instance = new JSONObject(data);
            this.instance = instance;
        } catch (final JSONException e) {
            throw new NoSqlStoreException("failed initialise JSON object for text form: " + data, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.objectstore.nosql.NoSqlStoreException

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.