get all schems of certain type
Dieser Commit ist enthalten in:
Ursprung
8dab3e2a88
Commit
7997703c0a
@ -109,6 +109,23 @@ public class Schematic {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<Schematic> getAllSchemsOfType(SchematicType schemType){
|
||||
try{
|
||||
ResultSet schematic = sql.select("SELECT * FROM Schematic WHERE SchemType = '" + schemType.name() + "'");
|
||||
List<Schematic> schematics = new ArrayList<>();
|
||||
while(schematic.next()){
|
||||
int schemOwner = schematic.getInt("SchemOwner");
|
||||
String schemName = schematic.getString("SchemName");
|
||||
String item = schematic.getString("Item");
|
||||
schematics.add(new Schematic(schemName, schemOwner, item, schemType, false));
|
||||
}
|
||||
return schematics;
|
||||
}catch(SQLException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getSchemName() {
|
||||
return SchemName;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren