Search in sources :

Example 61 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project candlepin by candlepin.

the class ConsumerDTO method equals.

/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (obj instanceof ConsumerDTO && super.equals(obj)) {
        ConsumerDTO that = (ConsumerDTO) obj;
        EqualsBuilder builder = new EqualsBuilder().append(this.getUuid(), that.getUuid()).append(this.getUsername(), that.getUsername()).append(this.getServiceLevel(), that.getServiceLevel()).append(this.getOwner(), that.getOwner()).append(this.getFacts(), that.getFacts()).append(this.getInstalledProducts(), that.getInstalledProducts()).append(this.getCapabilities(), that.getCapabilities()).append(this.getType(), that.getType());
        return builder.isEquals();
    }
    return false;
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 62 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project candlepin by candlepin.

the class CertificateDTO method equals.

/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (obj instanceof CertificateDTO && super.equals(obj)) {
        CertificateDTO that = (CertificateDTO) obj;
        EqualsBuilder builder = new EqualsBuilder().append(this.getId(), that.getId()).append(this.getKey(), that.getKey()).append(this.getCert(), that.getCert()).append(this.getSerial(), that.getSerial());
        return builder.isEquals();
    }
    return false;
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 63 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project candlepin by candlepin.

the class CertificateSerialDTO method equals.

/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (obj instanceof CertificateSerialDTO && super.equals(obj)) {
        CertificateSerialDTO that = (CertificateSerialDTO) obj;
        EqualsBuilder builder = new EqualsBuilder().append(this.getId(), that.getId()).append(this.getSerial(), that.getSerial()).append(this.getExpiration(), that.getExpiration()).append(this.isCollected(), that.isCollected()).append(this.isRevoked(), that.isRevoked());
        return builder.isEquals();
    }
    return false;
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 64 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project candlepin by candlepin.

the class ConsumerDTO method equals.

/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (obj instanceof ConsumerDTO && super.equals(obj)) {
        ConsumerDTO that = (ConsumerDTO) obj;
        String thisOid = this.getOwner() != null ? this.getOwner().getId() : null;
        String thatOid = that.getOwner() != null ? that.getOwner().getId() : null;
        String thisEnvId = this.getEnvironment() != null ? this.getEnvironment().getId() : null;
        String thatEnvId = that.getEnvironment() != null ? that.getEnvironment().getId() : null;
        String thisHypervisorId = this.getHypervisorId() != null ? this.getHypervisorId().getId() : null;
        String thatHypervisorId = that.getHypervisorId() != null ? that.getHypervisorId().getId() : null;
        EqualsBuilder builder = new EqualsBuilder().append(this.getId(), that.getId()).append(this.getUuid(), that.getUuid()).append(this.getName(), that.getName()).append(this.getUsername(), that.getUsername()).append(this.getEntitlementStatus(), that.getEntitlementStatus()).append(this.getServiceLevel(), that.getServiceLevel()).append(this.getReleaseVersion(), that.getReleaseVersion()).append(thisOid, thatOid).append(thisEnvId, thatEnvId).append(this.getEntitlementCount(), that.getEntitlementCount()).append(this.getFacts(), that.getFacts()).append(this.getLastCheckin(), that.getLastCheckin()).append(this.getInstalledProducts(), that.getInstalledProducts()).append(this.isCanActivate(), that.isCanActivate()).append(this.getCapabilities(), that.getCapabilities()).append(thisHypervisorId, thatHypervisorId).append(this.getContentTags(), that.getContentTags()).append(this.getAutoheal(), that.getAutoheal()).append(this.getRecipientOwnerKey(), that.getRecipientOwnerKey()).append(this.getAnnotations(), that.getAnnotations()).append(this.getContentAccessMode(), that.getContentAccessMode()).append(this.getType(), that.getType()).append(this.getIdCert(), that.getIdCert()).append(this.getGuestIds(), that.getGuestIds());
        return builder.isEquals();
    }
    return false;
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Example 65 with EqualsBuilder

use of org.apache.commons.lang.builder.EqualsBuilder in project candlepin by candlepin.

the class ConsumerInstalledProductDTO method equals.

/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (obj instanceof ConsumerInstalledProductDTO && super.equals(obj)) {
        ConsumerInstalledProductDTO that = (ConsumerInstalledProductDTO) obj;
        EqualsBuilder builder = new EqualsBuilder().append(this.getId(), that.getId()).append(this.getProductId(), that.getProductId()).append(this.getProductName(), that.getProductName()).append(this.getVersion(), that.getVersion()).append(this.getArch(), that.getArch()).append(this.getStatus(), that.getStatus()).append(this.getStartDate(), that.getStartDate()).append(this.getEndDate(), that.getEndDate());
        return builder.isEquals();
    }
    return false;
}
Also used : EqualsBuilder(org.apache.commons.lang.builder.EqualsBuilder)

Aggregations

EqualsBuilder (org.apache.commons.lang.builder.EqualsBuilder)95 ZooKeeper (org.apache.zookeeper.ZooKeeper)1 Product (org.candlepin.model.Product)1 AbstractStepMeta (org.pentaho.di.core.util.AbstractStepMeta)1 IPentahoRole (org.pentaho.platform.api.engine.security.userroledao.IPentahoRole)1 IPentahoUser (org.pentaho.platform.api.engine.security.userroledao.IPentahoUser)1