use of org.structr.core.entity.GenericNode in project structr by structr.
the class TextSearchModuleTest method createTestRelationships.
protected <T extends Relation> List<T> createTestRelationships(final Class<T> relType, final int number) throws FrameworkException {
List<GenericNode> nodes = createTestNodes(GenericNode.class, 2);
final NodeInterface startNode = nodes.get(0);
final NodeInterface endNode = nodes.get(1);
try (final Tx tx = app.tx()) {
List<T> rels = new LinkedList<>();
for (int i = 0; i < number; i++) {
rels.add((T) app.create(startNode, endNode, relType));
}
tx.success();
return rels;
}
}
use of org.structr.core.entity.GenericNode in project structr by structr.
the class StructrXMPPModuleTest method createTestRelationships.
protected <T extends Relation> List<T> createTestRelationships(final Class<T> relType, final int number) throws FrameworkException {
List<GenericNode> nodes = createTestNodes(GenericNode.class, 2);
final NodeInterface startNode = nodes.get(0);
final NodeInterface endNode = nodes.get(1);
try (final Tx tx = app.tx()) {
List<T> rels = new LinkedList<>();
for (int i = 0; i < number; i++) {
rels.add((T) app.create(startNode, endNode, relType));
}
tx.success();
return rels;
}
}
use of org.structr.core.entity.GenericNode in project structr by structr.
the class StructrUiTest method createTestRelationships.
protected List<RelationshipInterface> createTestRelationships(final Class relType, final int number) throws FrameworkException {
List<GenericNode> nodes = createTestNodes(GenericNode.class, 2);
final GenericNode startNode = nodes.get(0);
final GenericNode endNode = nodes.get(1);
List<RelationshipInterface> rels = new LinkedList<>();
for (int i = 0; i < number; i++) {
rels.add(app.create(startNode, endNode, relType));
}
return rels;
}
use of org.structr.core.entity.GenericNode in project structr by structr.
the class StructrCsvModuleTest method createTestRelationships.
protected <T extends Relation> List<T> createTestRelationships(final Class<T> relType, final int number) throws FrameworkException {
List<GenericNode> nodes = createTestNodes(GenericNode.class, 2);
final NodeInterface startNode = nodes.get(0);
final NodeInterface endNode = nodes.get(1);
try (final Tx tx = app.tx()) {
List<T> rels = new LinkedList<>();
for (int i = 0; i < number; i++) {
rels.add((T) app.create(startNode, endNode, relType));
}
tx.success();
return rels;
}
}
use of org.structr.core.entity.GenericNode in project structr by structr.
the class StructrUiTest method createTestRelationships.
protected List<RelationshipInterface> createTestRelationships(final Class relType, final int number) throws FrameworkException {
List<GenericNode> nodes = createTestNodes(GenericNode.class, 2);
final GenericNode startNode = nodes.get(0);
final GenericNode endNode = nodes.get(1);
List<RelationshipInterface> rels = new LinkedList<>();
for (int i = 0; i < number; i++) {
rels.add(app.create(startNode, endNode, relType));
}
return rels;
}
Aggregations