001/** 002 * Copyright (C) 2010-2015 The Roslin Institute <contact andy.law@roslin.ed.ac.uk> 003 * 004 * This file is part of JEnsembl: a Java API to Ensembl data sources developed by the 005 * Bioinformatics Group at The Roslin Institute, The Royal (Dick) School of 006 * Veterinary Studies, University of Edinburgh. 007 * 008 * Project hosted at: http://jensembl.sourceforge.net 009 * 010 * This is free software: you can redistribute it and/or modify 011 * it under the terms of the GNU General Public License (version 3) as published by 012 * the Free Software Foundation. 013 * 014 * This software is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * in this software distribution. If not, see: http://opensource.org/licenses/gpl-3.0.html 021 */ 022package uk.ac.roslin.ensembl.model; 023 024import java.io.Serializable; 025import uk.ac.roslin.ensembl.config.EnsemblCoreObjectType; 026 027public class ExternalDB implements Serializable{ 028 029 String dBName = null; 030 String dBDisplayName = null ; 031 String dBRelease = null; 032 String dBStatus = null; 033 String dBType = null; 034 String dBDescription = null; 035 Integer id = null; 036 037 public String getDBDisplayName() { 038 return dBDisplayName; 039 } 040 041 public void setDBDisplayName(String dBDisplayName) { 042 this.dBDisplayName = dBDisplayName; 043 } 044 045 public String getDBName() { 046 return dBName; 047 } 048 049 public void setDBName(String dBName) { 050 this.dBName = dBName; 051 } 052 053 public String getDBRelease() { 054 return dBRelease; 055 } 056 057 public void setDBRelease(String dBRelease) { 058 this.dBRelease = dBRelease; 059 } 060 061 public String getDBStatus() { 062 return dBStatus; 063 } 064 065 public void setDBStatus(String dBStatus) { 066 this.dBStatus = dBStatus; 067 } 068 069 public String getDBDescription() { 070 return dBDescription; 071 } 072 073 public void setDBDescription(String dBDescription) { 074 this.dBDescription = dBDescription; 075 } 076 077 public Integer getId() { 078 return id; 079 } 080 081 public void setId(Integer id) { 082 this.id = id; 083 } 084 085 public ObjectType getType() { 086 return EnsemblCoreObjectType.externalDB; 087 } 088 089 @Override 090 public int hashCode() { 091 int hash = 3; 092 hash = 89 * hash + (this.dBName != null ? this.dBName.hashCode() : 0); 093 return hash; 094 } 095 096 public int originalHashCode() { 097 return super.hashCode(); 098 } 099 100 @Override 101 public boolean equals(Object db) { 102 103 if (!(db instanceof ExternalDB)) { 104 return false; 105 } 106 if (this.getDBName() != null && this.getDBName().equals(((ExternalDB) db).getDBName())) { 107 return true; 108 } else return false; 109 } 110}