コード例 #1
0
 public int compareTo(Object obj, boolean caseInsensitive) {
   if (obj == null) {
     return -1;
   }
   if (caseInsensitive) ; // this is to avoid eclipse warning only.
   if (!(AppNavShortVo.class.isAssignableFrom(obj.getClass()))) {
     throw new ClassCastException(
         "A AppNavShortVo object cannot be compared an Object of type "
             + obj.getClass().getName());
   }
   AppNavShortVo compareObj = (AppNavShortVo) obj;
   int retVal = 0;
   if (retVal == 0) {
     if (this.getNavigationName() == null && compareObj.getNavigationName() != null) return -1;
     if (this.getNavigationName() != null && compareObj.getNavigationName() == null) return 1;
     if (this.getNavigationName() != null && compareObj.getNavigationName() != null) {
       if (caseInsensitive)
         retVal =
             this.getNavigationName()
                 .toLowerCase()
                 .compareTo(compareObj.getNavigationName().toLowerCase());
       else retVal = this.getNavigationName().compareTo(compareObj.getNavigationName());
     }
   }
   return retVal;
 }
コード例 #2
0
  public Object clone() {
    if (this.isBusy) return this;
    this.isBusy = true;

    AppNavShortVo clone = new AppNavShortVo(this.id, this.version);

    clone.navigationname = this.navigationname;
    clone.isactive = this.isactive;
    clone.comment = this.comment;
    clone.isValidated = this.isValidated;

    this.isBusy = false;
    return clone;
  }