Search in sources :

Example 1 with FastTable

use of javolution.util.FastTable in project org.openntf.domino by OpenNTF.

the class DElementStore method getVertexIds.

// @Override
// public Set<Vertex> getCachedVertices() {
// FastSet<Vertex> result = new FastSet<Vertex>();
// for (Element elem : getElementCache().values()) {
// if (elem instanceof Vertex) {
// result.add((Vertex) elem);
// }
// }
// return result.unmodifiable();
// }
protected List<NoteCoordinate> getVertexIds() {
    FastTable<NoteCoordinate> result = new FastTable<NoteCoordinate>();
    Object raw = getStoreDelegate();
    if (raw instanceof Database) {
        Database db = (Database) raw;
        NoteCollection nc = db.createNoteCollection(false);
        nc.setSelectDocuments(true);
        nc.setSelectionFormula(org.openntf.domino.graph2.DVertex.FORMULA_FILTER);
        nc.buildCollection();
        for (String noteid : nc) {
            result.add(NoteCoordinate.Utils.getNoteCoordinate(nc, noteid));
        }
    } else {
        // TODO NTF implement alternative
        throw new IllegalStateException("Non-Domino implementations not yet available");
    }
    return result;
}
Also used : NoteCoordinate(org.openntf.domino.big.NoteCoordinate) NoteCollection(org.openntf.domino.NoteCollection) FastTable(javolution.util.FastTable) Database(org.openntf.domino.Database)

Example 2 with FastTable

use of javolution.util.FastTable in project org.openntf.domino by OpenNTF.

the class DElementStore method getVertexIds.

protected List<NoteCoordinate> getVertexIds(final String formulaFilter) {
    FastTable<NoteCoordinate> result = new FastTable<NoteCoordinate>();
    Object raw = getStoreDelegate();
    if (raw instanceof Database) {
        Database db = (Database) raw;
        NoteCollection nc = db.createNoteCollection(false);
        nc.setSelectDocuments(true);
        nc.setSelectionFormula(formulaFilter);
        nc.buildCollection();
        for (String noteid : nc) {
            result.add(NoteCoordinate.Utils.getNoteCoordinate(nc, noteid));
        }
    } else {
        // TODO NTF implement alternative
        throw new IllegalStateException("Non-Domino implementations not yet available");
    }
    return result;
}
Also used : NoteCoordinate(org.openntf.domino.big.NoteCoordinate) NoteCollection(org.openntf.domino.NoteCollection) FastTable(javolution.util.FastTable) Database(org.openntf.domino.Database)

Example 3 with FastTable

use of javolution.util.FastTable in project org.openntf.domino by OpenNTF.

the class DElementStore method getEdgeIds.

protected List<NoteCoordinate> getEdgeIds(final String formulaFilter) {
    FastTable<NoteCoordinate> result = new FastTable<NoteCoordinate>();
    Object raw = getStoreDelegate();
    if (raw instanceof Database) {
        Database db = (Database) raw;
        NoteCollection nc = db.createNoteCollection(false);
        nc.setSelectDocuments(true);
        nc.setSelectionFormula(formulaFilter);
        nc.buildCollection();
        for (String noteid : nc) {
            result.add(NoteCoordinate.Utils.getNoteCoordinate(nc, noteid));
        }
    } else {
        // TODO NTF implement alternative
        throw new IllegalStateException("Non-Domino implementations not yet available");
    }
    return result;
}
Also used : NoteCoordinate(org.openntf.domino.big.NoteCoordinate) NoteCollection(org.openntf.domino.NoteCollection) FastTable(javolution.util.FastTable) Database(org.openntf.domino.Database)

Example 4 with FastTable

use of javolution.util.FastTable in project org.openntf.domino by OpenNTF.

the class DElementStore method getEdgeIds.

// @Override
// public Set<Edge> getCachedEdges() {
// FastSet<Edge> result = new FastSet<Edge>();
// for (Element elem : getElementCache().values()) {
// if (elem instanceof Edge) {
// result.add((Edge) elem);
// }
// }
// return result.unmodifiable();
// }
protected List<NoteCoordinate> getEdgeIds() {
    FastTable<NoteCoordinate> result = new FastTable<NoteCoordinate>();
    Object raw = getStoreDelegate();
    if (raw instanceof Database) {
        Database db = (Database) raw;
        NoteCollection nc = db.createNoteCollection(false);
        nc.setSelectDocuments(true);
        nc.setSelectionFormula(org.openntf.domino.graph2.DEdge.FORMULA_FILTER);
        nc.buildCollection();
        for (String noteid : nc) {
            result.add(NoteCoordinate.Utils.getNoteCoordinate(nc, noteid));
        }
    } else {
        // TODO NTF implement alternative
        throw new IllegalStateException("Non-Domino implementations not yet available");
    }
    return result;
}
Also used : NoteCoordinate(org.openntf.domino.big.NoteCoordinate) NoteCollection(org.openntf.domino.NoteCollection) FastTable(javolution.util.FastTable) Database(org.openntf.domino.Database)

Aggregations

FastTable (javolution.util.FastTable)4 Database (org.openntf.domino.Database)4 NoteCollection (org.openntf.domino.NoteCollection)4 NoteCoordinate (org.openntf.domino.big.NoteCoordinate)4