X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/model/Schema.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/model/Schema.java index 154e15b..4f4f1d2 100644 --- a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/model/Schema.java +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/model/Schema.java @@ -3,12 +3,12 @@ package com.quantum.model; /** * @author BC */ -public class Schema implements Comparable { +public class Schema implements Comparable, Displayable { private String name; private String displayName; private boolean isDefault; - + private boolean exists = true; public Schema() { } @@ -27,14 +27,14 @@ public class Schema implements Comparable { * @return */ public String getName() { - return name; + return this.name; } /** * @param string */ - public void setName(String string) { - name = string; + public void setName(String name) { + this.name = name; } /** @@ -67,7 +67,7 @@ public class Schema implements Comparable { } } public int hashCode() { - int hashCode = super.hashCode(); + int hashCode = 51; if (this.name != null) { hashCode ^= this.name.hashCode(); } @@ -82,7 +82,7 @@ public class Schema implements Comparable { * @return */ public boolean isDefault() { - return isDefault; + return this.isDefault; } /** @@ -96,14 +96,25 @@ public class Schema implements Comparable { * @return */ public String getDisplayName() { - return displayName; + return this.displayName; } /** * @param string */ - public void setDisplayName(String string) { - displayName = string; + public void setDisplayName(String displayName) { + this.displayName = displayName; } + public boolean exists() { + return this.exists; + } + + void setExists(boolean exists) { + this.exists = exists; + } + + public String toString() { + return this.displayName == null ? this.name : this.displayName; + } }