/**
* Copyright (c) 2009--2010 Red Hat, Inc.
*
* This software is licensed to you under the GNU General Public License,
* version 2 (GPLv2). There is NO WARRANTY for this software, express or
* implied, including the implied warranties of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
* along with this software; if not, see
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
*
* Red Hat trademarks are not licensed under GPLv2. No permission is
* granted to use or replicate Red Hat trademarks that are incorporated
* in this software or its documentation.
*/
package com.redhat.rhn.domain.kickstart.crypto;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.Date;
/**
* CryptoKeyType - Class representation of the table rhnCryptoKeyType.
* @version $Rev: 1 $
*/
public class CryptoKeyType {
private Long id;
private String label;
private String description;
private Date created;
private Date modified;
/**
* Getter for id
* @return Long to get
*/
public Long getId() {
return this.id;
}
/**
* Setter for id
* @param idIn to set
*/
public void setId(Long idIn) {
this.id = idIn;
}
/**
* Getter for label
* @return String to get
*/
public String getLabel() {
return this.label;
}
/**
* Setter for label
* @param labelIn to set
*/
public void setLabel(String labelIn) {
this.label = labelIn;
}
/**
* Getter for description
* @return String to get
*/
public String getDescription() {
return this.description;
}
/**
* Setter for description
* @param descriptionIn to set
*/
public void setDescription(String descriptionIn) {
this.description = descriptionIn;
}
/**
* Getter for created
* @return Date to get
*/
public Date getCreated() {
return this.created;
}
/**
* Setter for created
* @param createdIn to set
*/
public void setCreated(Date createdIn) {
this.created = createdIn;
}
/**
* Getter for modified
* @return Date to get
*/
public Date getModified() {
return this.modified;
}
/**
* Setter for modified
* @param modifiedIn to set
*/
public void setModified(Date modifiedIn) {
this.modified = modifiedIn;
}
/**
* {@inheritDoc}
*/
public boolean equals(final Object other) {
if (!(other instanceof CryptoKeyType)) {
return false;
}
CryptoKeyType castOther = (CryptoKeyType) other;
return new EqualsBuilder().append(this.getLabel(), castOther.getLabel()).isEquals();
}
/**
* {@inheritDoc}
*/
public int hashCode() {
return new HashCodeBuilder().append(getLabel()).toHashCode();
}
}