All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinitenature.commons.pagination.impl.OffsetRequestImplBeanUtil Maven / Gradle / Ivy

There is a newer version: 0.0.7
Show newest version
package org.infinitenature.commons.pagination.impl;

import javax.annotation.Generated;

@Generated(value = "net.vergien.beanautoutils.processor.BeanAutoUtilsProcessor")
public class OffsetRequestImplBeanUtil {
  private OffsetRequestImplBeanUtil() {
    throw new java.lang.IllegalAccessError("Utility class");
  }

  public static String doToString(OffsetRequestImpl offsetRequestImpl) {
    StringBuilder builder = new StringBuilder();
    builder.append("OffsetRequestImpl@");
    builder.append(System.identityHashCode(offsetRequestImpl));
    builder.append("[");
    builder.append("offset=");
    builder.append(offsetRequestImpl.getOffset());
    builder.append(", ");
    builder.append("count=");
    builder.append(offsetRequestImpl.getCount());
    builder.append(", ");
    builder.append("sortOrder=");
    builder.append(offsetRequestImpl.getSortOrder());
    builder.append(", ");
    builder.append("sortField=");
    builder.append(offsetRequestImpl.getSortField());
    builder.append("]");
    return builder.toString();
  }

  public static int doToHashCode(OffsetRequestImpl offsetRequestImpl) {
    final int prime = 31;
    int result = 1;
    result = prime * result + offsetRequestImpl.getOffset();
    result = prime * result + offsetRequestImpl.getCount();
    result = prime * result + ((offsetRequestImpl.getSortOrder() == null) ? 0 : offsetRequestImpl.getSortOrder().hashCode());
    result = prime * result + ((offsetRequestImpl.getSortField() == null) ? 0 : offsetRequestImpl.getSortField().hashCode());
    return result;
  }

  public static boolean doEquals(OffsetRequestImpl lhs, Object obj) {
    if (lhs == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (lhs.getClass() != obj.getClass()) {
      return false;
    }
    OffsetRequestImpl other = (OffsetRequestImpl) obj;
    if (lhs.getOffset() != other.getOffset()) {
      return false;
    }
    if (lhs.getCount() != other.getCount()) {
      return false;
    }
    if (lhs.getSortOrder() == null) {
      if (other.getSortOrder() != null) {
        return false;
      }
    } else if (!lhs.getSortOrder().equals(other.getSortOrder())) {
      return false;
    }
    if (lhs.getSortField() == null) {
      if (other.getSortField() != null) {
        return false;
      }
    } else if (!lhs.getSortField().equals(other.getSortField())) {
      return false;
    }
    return true;
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy