Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0003864: Snapshot table definitions from different catalog schema
- Loading branch information
Showing
2 changed files
with
118 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
symmetric-db/src/main/java/org/jumpmind/db/model/CatalogSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* Licensed to JumpMind Inc under one or more contributor | ||
* license agreements. See the NOTICE file distributed | ||
* with this work for additional information regarding | ||
* copyright ownership. JumpMind Inc licenses this file | ||
* to you under the GNU General Public License, version 3.0 (GPLv3) | ||
* (the "License"); you may not use this file except in compliance | ||
* with the License. | ||
* | ||
* You should have received a copy of the GNU General Public License, | ||
* version 3.0 (GPLv3) along with this library; if not, see | ||
* <http://www.gnu.org/licenses/>. | ||
* | ||
* 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 org.jumpmind.db.model; | ||
|
||
public class CatalogSchema { | ||
|
||
private String catalog; | ||
|
||
private String schema; | ||
|
||
public CatalogSchema(String catalog, String schema) { | ||
this.catalog = catalog; | ||
this.schema = schema; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((catalog == null) ? 0 : catalog.hashCode()); | ||
result = prime * result + ((schema == null) ? 0 : schema.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
CatalogSchema other = (CatalogSchema) obj; | ||
if (catalog == null) { | ||
if (other.catalog != null) | ||
return false; | ||
} else if (!catalog.equals(other.catalog)) | ||
return false; | ||
if (schema == null) { | ||
if (other.schema != null) | ||
return false; | ||
} else if (!schema.equals(other.schema)) | ||
return false; | ||
return true; | ||
} | ||
|
||
public String getCatalog() { | ||
return catalog; | ||
} | ||
|
||
public void setCatalog(String catalog) { | ||
this.catalog = catalog; | ||
} | ||
|
||
public String getSchema() { | ||
return schema; | ||
} | ||
|
||
public void setSchema(String schema) { | ||
this.schema = schema; | ||
} | ||
} |