продолжение рефакторинга. создал предка для класса current
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.Server;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import Repository.RepositoryServer;
|
||||
@@ -15,14 +16,14 @@ public abstract class CloneServerObject<S extends RepositoryServer, D extends ri
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
src=null;
|
||||
if (!Current.Check(Log, currentName()))
|
||||
if (!CurrentAnchestor.Check(Log, currentName()))
|
||||
return false;
|
||||
|
||||
//---------
|
||||
pk = null;
|
||||
if (Current.getAccount().CheckRegistered(Log)) {
|
||||
target = d.newInstance();
|
||||
target.SynchronizeFields(src=(D) Current.get(currentName()));
|
||||
target.SynchronizeFields(src=(D) CurrentAnchestor.get(currentName()));
|
||||
//единственное отличие клона - текущий автор
|
||||
target.description+=" копия";
|
||||
target.sender_name = Current.getAccount().name;
|
||||
|
||||
Reference in New Issue
Block a user