// public void copyDoc(CopyDocMtl copyDocM, MtlDbService dbService) { // copy(copyDocM.getDocT(),copyDocM,this,dbService); // } // private void copy(Tree originalT, CopyDocMtl copyDocM, Tree newDocT, MtlDbService dbService) { // if(copyDocM.getNotCopyS().contains(originalT))return; // setId(dbService.nextDbid()); // setDocT(newDocT); // // newDocT.getDocNodes().add(this); // copyAtt(originalT); // copyDocM.getTree().put(originalT.getId(), originalT); // copyDocM.getNewTree().put(originalT.getId(), this); // System.out.println(originalT+"\n to "+this); // copyDocM.addTreePaar(this); // dbService.getEntityManager().persist(this); // // if(originalT.getRef()!=null) // copyDocM.addRef(originalT); // if(originalT.getChildTs()!=null){ // childTs=new ArrayList<Tree>(); // for (Tree ocT : originalT.getChildTs()) { // Tree newT = new Tree(); // newT.setParentT(this); // childTs.add(newT); // newT.copy(ocT, copyDocM, newDocT, dbService); // } // } // } public void copyAtt(Tree originalT) { setTabName(originalT.getTabName()); setIdClass(originalT.getIdClass()); setSort(originalT.getSort()); }
public void setSort(int sort) { setSort((long) sort); }