@Override public int getColumnCount() throws SQLException { if(cachedColumnNames == null || cachedGeomColumnNames==null) { cacheColumnNames(); } if(cachedColumnCount == -1) { try(Resource res = resultSetHolder.getResource()) { int hiddenFields = excludeGeomFields?cachedGeomColumnNames.size():0; cachedColumnCount = res.getResultSet().getMetaData().getColumnCount()-hiddenFields; if(cachedColumnCount == 0){ cachedColumnCount = res.getResultSet().getMetaData().getColumnCount(); } return cachedColumnCount; } } return cachedColumnCount; }
private void cacheTree(ITracerObject treeNode) { traceTreeCache.put(traceTreeCache.size(), treeNode); if (treeNode instanceof RefToTracerNodeObject) { //no need to add children nodes of reference node to the treeCache //because they will be added from original node return; } Iterable<ITracerObject> children = treeNode.getChildren(); for (ITracerObject child : children) { cacheTree(child); } }
private void cacheTree(ITracerObject treeNode) { traceTreeCache.put(traceTreeCache.size(), treeNode); if (treeNode instanceof RefToTracerNodeObject) { //no need to add children nodes of reference node to the treeCache //because they will be added from original node return; } Iterable<ITracerObject> children = treeNode.getChildren(); for (ITracerObject child : children) { cacheTree(child); } }
Preconditions.checkArgument(topologicalVertexStack.size() == vertices.size(), "size of topologicalVertexStack is:" + topologicalVertexStack.size() + " while size of vertices is:" + vertices.size() + ", make sure they are the same in order to sort the vertices"); while(!topologicalVertexStack.isEmpty()) {