Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2006-2008 Floggy Open Source Group Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package net.sourceforge.floggy.persistence.beans;
 
 
 
 public class Patient extends Person implements Persistable {
 
     private static int hashCode(Object[] array) {
 		final int prime = 31;
 		if (array == null)
 			return 0;
 		int result = 1;
 		for (int index = 0; index < array.lengthindex++) {
 			result = prime * result
 					+ (array[index] == null ? 0 : array[index].hashCode());
 		}
 		return result;
 	}
 
 	private static int TELEFONE_CASA = 0;
 
     private static int TELEFONE_CELULAR = 1;
 
     private static int TELEFONE_TRABALHO = 2;
 
     private String address;
 
     private String[] phones;
 
     private boolean insuredByGoverment;
 
     public Patient() {
         this. = new String[3];
     }
 
     public String getAddress() {
         return ;
     }
 
     public void setAddress(String endereco) {
         this. = endereco;
     }
 
     public boolean isInsuredByGoverment() {
         return ;
     }
 
     public void setInsuredByGoverment(boolean particular) {
         this. = particular;
     }
     
     public String[] getPhones() {
 		return ;
 	}
     
     public void setPhones(String[] telefones) {
 		this. = telefones;
 	}
 
     public String getTelefoneCasa() {
         return this.[];
     }
 
     public void setTelefoneCasa(String telefone) {
         this.[] = telefone;
     }
 
     public String getTelefoneCelular() {
         return this.[];
     }
 
     public void setTelefoneCelular(String telefone) {
         this.[] = telefone;
     }
 
     public String getTelefoneTrabalho() {
         return this.[];
     }
 
     public void setTelefoneTrabalho(String telefone) {
         this.[] = telefone;
     }
 
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + (( == null) ? 0 : .hashCode());
		result = prime * result + ( ? 1231 : 1237);
		result = prime * result + Patient.hashCode();
		return result;
	}
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Patient other = (Patientobj;
		if ( == null) {
			if (other.address != null)
				return false;
else if (!.equals(other.address))
			return false;
		if ( != other.insuredByGoverment)
			return false;
		if (!Arrays.equals(other.phones))
			return false;
		return true;
	}
New to GrepCode? Check out our FAQ X