упорядочил папки с кодом.
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
package Visual_DVM_2021.Passes.Server;
|
||||
import Common.Database.riDBObject;
|
||||
import Repository.RepositoryServer;
|
||||
public class DeleteServerObject<S extends RepositoryServer, D extends riDBObject> extends ServerObjectPass<S, D> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/Delete.png";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = (D) getDb().tables.get(d).getCurrent();
|
||||
return getDb().tables.get(d).CheckCurrent(Log) && getDb().tables.get(d).ShowDeleteObjectDialog(target);
|
||||
}
|
||||
//Очищаем все связанные таблицы, чтобы не допустить перерисовки во время удаления объекта.
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
getDb().tables.get(d).ClearUI();
|
||||
for (Class dep : getDb().tables.get(d).getFKDependencies().keySet()) {
|
||||
switch (getDb().tables.get(d).getFKDependencies().get(dep).data) {
|
||||
case NONE:
|
||||
case DROP:
|
||||
break;
|
||||
case DELETE:
|
||||
getDb().tables.get(dep).ClearUI();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public DeleteServerObject(S server_in, Class<D> d_in) {
|
||||
super(server_in, d_in);
|
||||
}
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
DeleteObject(target);
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
getDb().tables.get(d).ui_.Show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user