/* * Copyright 2014 by SCSK Corporation. * * This file is part of PrimeCloud Controller(TM). * * PrimeCloud Controller(TM) is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * PrimeCloud Controller(TM) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with PrimeCloud Controller(TM). If not, see <http://www.gnu.org/licenses/>. */ package jp.primecloud.auto.entity.crud; import java.io.Serializable; /** * <p> * PUPPET_INSTANCEに対応したエンティティのベースクラスです。 * </p> * */ public abstract class BasePuppetInstance implements Serializable { /** SerialVersionUID */ private static final long serialVersionUID = 1L; /** INSTANCE_NO [BIGINT(19,0)] */ private Long instanceNo; /** PASSWORD [VARCHAR(50,0)] */ private String password; /** * instanceNoを取得します。 * * @return instanceNo */ public Long getInstanceNo() { return instanceNo; } /** * instanceNoを設定します。 * * @param instanceNo instanceNo */ public void setInstanceNo(Long instanceNo) { this.instanceNo = instanceNo; } /** * passwordを取得します。 * * @return password */ public String getPassword() { return password; } /** * passwordを設定します。 * * @param password password */ public void setPassword(String password) { this.password = password; } /** * {@inheritDoc} */ @Override public int hashCode() { int result = 1; final int prime = 31; result = prime * result + ((instanceNo == null) ? 0 : instanceNo.hashCode()); result = prime * result + ((password == null) ? 0 : password.hashCode()); return result; } /** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final BasePuppetInstance other = (BasePuppetInstance) obj; if (instanceNo == null) { if (other.instanceNo != null) { return false; } } else if (!instanceNo.equals(other.instanceNo)) { return false; } if (password == null) { if (other.password != null) { return false; } } else if (!password.equals(other.password)) { return false; } return true; } /** * {@inheritDoc} */ @Override public String toString() { StringBuffer sb = new StringBuffer(); sb.append("PuppetInstance").append(" ["); sb.append("instanceNo=").append(instanceNo).append(", "); sb.append("password=").append(password); sb.append("]"); return sb.toString(); } }