Examples of NoSqlStoreException


Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

        try {
            m = new Mongo(host, port);
            db = m.getDB(dbName);
            LOG.info("opened database (" + dbName + "): " + db);
        } catch (final UnknownHostException e) {
            throw new NoSqlStoreException(e);
        } catch (final MongoException e) {
            throw new NoSqlStoreException(e);
        }
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

                return new MongoStateReader(cursor.next());
            }

            @Override
            public void remove() {
                throw new NoSqlStoreException("Can't remove elements");
            }

        };
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

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

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

    @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

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

    @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

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

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

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

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

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

    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

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

            } else {
                encryptionType = "none";
            }
            return encryptionType;
        } catch (final JSONException e) {
            throw new NoSqlStoreException("failed to read field _encrypt", e);
        }
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.nosql.NoSqlStoreException

    private String readRequiredField(final String name) {
        try {
            final Object value = instance.get(name);
            return (String) value;
        } catch (final JSONException e) {
            throw new NoSqlStoreException("failed to read field " + name, e);
        }
    }
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.