use of com.runwaysdk.dataaccess.graph.GraphDBService in project geoprism-registry by terraframe.
the class CRAttributePatch method executeGraphDDLCommand.
public void executeGraphDDLCommand(String sql) {
GraphDBService service = GraphDBService.getInstance();
GraphRequest dml = service.getGraphDBRequest();
GraphRequest ddl = service.getDDLGraphDBRequest();
GraphDDLCommandAction action = service.ddlCommand(dml, ddl, sql, new HashMap<String, Object>());
action.execute();
}
use of com.runwaysdk.dataaccess.graph.GraphDBService in project geoprism-registry by terraframe.
the class CreateEventSequencePatch method doIt.
@Request
private void doIt() {
StringBuilder statement = new StringBuilder();
statement.append("CREATE SEQUENCE " + TransitionEvent.EVENT_SEQUENCE + " TYPE ORDERED");
GraphDBService service = GraphDBService.getInstance();
GraphRequest graphRequest = service.getGraphDBRequest();
service.command(graphRequest, statement.toString(), new HashedMap<>());
}
use of com.runwaysdk.dataaccess.graph.GraphDBService in project geoprism-registry by terraframe.
the class SearchService method clear.
@Transaction
public void clear() {
String suffix = this.getSuffix();
MdVertexDAOIF mdVertex = MdVertexDAO.getMdVertexDAO(PACKAGE + "." + VERTEX_PREFIX + suffix);
StringBuilder statement = new StringBuilder();
statement.append("DELETE VERTEX " + mdVertex.getDBClassName());
GraphDBService service = GraphDBService.getInstance();
GraphRequest request = service.getGraphDBRequest();
service.command(request, statement.toString(), new HashMap<>());
}
use of com.runwaysdk.dataaccess.graph.GraphDBService in project geoprism-registry by terraframe.
the class SearchService method clear.
// @Transaction
public void clear(String vertexType) {
String suffix = this.getSuffix();
MdVertexDAOIF mdVertex = MdVertexDAO.getMdVertexDAO(PACKAGE + "." + VERTEX_PREFIX + suffix);
MdAttributeDAOIF mdVertexType = mdVertex.definesAttribute(VERTEX_TYPE);
StringBuilder statement = new StringBuilder();
statement.append("DELETE VERTEX " + mdVertex.getDBClassName());
statement.append(" WHERE " + mdVertexType.getColumnName() + " = :vertexType");
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("vertexType", vertexType);
GraphDBService service = GraphDBService.getInstance();
GraphRequest request = service.getGraphDBRequest();
GraphRequest ddlRequest = service.getDDLGraphDBRequest();
service.ddlCommand(request, ddlRequest, statement.toString(), parameters);
}
use of com.runwaysdk.dataaccess.graph.GraphDBService in project geoprism-registry by terraframe.
the class VertexServerGeoObject method removeAllEdges.
public static void removeAllEdges(ServerHierarchyType hierarchyType, ServerGeoObjectType childType) {
StringBuilder statement = new StringBuilder();
statement.append("DELETE EDGE " + hierarchyType.getMdEdge().getDBClassName());
statement.append(" WHERE in.@class = :class");
statement.append(" OR out.@class = :class");
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("class", childType.getMdVertex().getDBClassName());
GraphDBService service = GraphDBService.getInstance();
service.command(service.getGraphDBRequest(), statement.toString(), parameters);
}
Aggregations