Schematic Nodes #90
@ -57,8 +57,8 @@ public class SchematicNode {
|
||||
return getSchematicNode(owner, name, type, parent.getId());
|
||||
}
|
||||
|
||||
public static List<SchematicNode> getSchematicNodeInNode(int owner, int parent) {
|
||||
ResultSet set = SQL.select("SELECT * FROM SchematicNode WHERE ParentNode = ? AND NodeOwner = ?", parent, owner);
|
||||
public static List<SchematicNode> getSchematicNodeInNode(int parent) {
|
||||
ResultSet set = SQL.select("SELECT * FROM SchematicNode WHERE ParentNode = ?", parent);
|
||||
try {
|
||||
List<SchematicNode> nodes = new ArrayList<>();
|
||||
while (set.next())
|
||||
@ -69,8 +69,8 @@ public class SchematicNode {
|
||||
}
|
||||
}
|
||||
|
||||
public static List<SchematicNode> getSchematicNodeInNode(int owner, SchematicNode parent) {
|
||||
return getSchematicNodeInNode(owner, parent.getId());
|
||||
public static List<SchematicNode> getSchematicNodeInNode(SchematicNode parent) {
|
||||
return getSchematicNodeInNode(parent.getId());
|
||||
}
|
||||
|
||||
public static SchematicNode getSchematicDirectory(int owner, String name, SchematicNode parent) {
|
||||
@ -223,6 +223,9 @@ public class SchematicNode {
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
if(isDir()) {
|
||||
getSchematicNodeInNode(getId()).forEach(SchematicNode::delete);
|
||||
}
|
||||
SQL.update("DELETE FROM SchematicNode WHERE NodeId = ?", id);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren