Advertisement
Guest User

Untitled

a guest
Jun 24th, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1.     /**
  2.      * provides an exact copy of this integrity check, minus runs and results.
  3.      *
  4.      * @param includeUuids
  5.      * @return
  6.      */
  7.     public IntegrityCheck clone(Boolean includeUuids){
  8.         IntegrityCheck check = new IntegrityCheck();
  9.         check.setUuid(includeUuids ? this.getUuid() : null);
  10.         check.setName(this.getName());
  11.         check.setDescription(this.getDescription());
  12.         check.setCheckLanguage(this.getCheckLanguage());
  13.         check.setCheckCode(this.getCheckCode());
  14.         check.setFailureType(this.getFailureType());
  15.         check.setFailureOperator(this.getFailureOperator());
  16.         check.setFailureThreshold(this.getFailureThreshold());
  17.         check.setResultsLanguage(this.getResultsLanguage());
  18.         check.setResultsCode(this.getResultsCode());
  19.         check.setResultsUniqueIdentifier(this.getResultsUniqueIdentifier());
  20.         check.setTotalLanguage(this.getTotalLanguage());
  21.         check.setTotalCode(this.getTotalCode());
  22.  
  23.         for (IntegrityCheckColumn column: this.getResultsColumns())
  24.             check.addResultsColumn(column.clone(includeUuids));
  25.        
  26.         return check;
  27.     }
  28.  
  29.     /**
  30.      * helper method for Metadata Sharing Module.
  31.      */
  32.     public Object writeReplace(){
  33.         return this.clone(true);
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement