001: /*
002: * DatabaseObject.java
003: *
004: * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: *
020: */
021:
022: package org.executequery.gui.browser;
023:
024: import org.executequery.databasemediators.DatabaseConnection;
025:
026: /* ----------------------------------------------------------
027: * CVS NOTE: Changes to the CVS repository prior to the
028: * release of version 3.0.0beta1 has meant a
029: * resetting of CVS revision numbers.
030: * ----------------------------------------------------------
031: */
032:
033: /**
034: *
035: * @author Takis Diakoumis
036: * @version $Revision: 1.4 $
037: * @date $Date: 2006/05/14 06:56:54 $
038: */
039: public class DatabaseObject {
040:
041: /** the node type */
042: private int type;
043:
044: /** whether this a system type node */
045: private boolean systemObject;
046:
047: /** the name of the associated schema */
048: private String schemaName;
049:
050: // a 'parent' entity name - eg table name for a column
051: private String parentName;
052:
053: /** the name of the associated catalog */
054: private String catalogName;
055:
056: /** the meta data key identifier (@see BrowserConstants)*/
057: private String metaDataKey;
058:
059: /** the name of this node */
060: private String name;
061:
062: /** any remarks associated with this object */
063: private String remarks;
064:
065: /** whether this is the default connected catalog */
066: private boolean defaultCatalog;
067:
068: private boolean useInQuery;
069:
070: public DatabaseObject() {
071: useInQuery = true;
072: }
073:
074: public DatabaseObject(int type, String name) {
075: useInQuery = true;
076: this .name = name;
077: this .type = type;
078: }
079:
080: public int getType() {
081: return type;
082: }
083:
084: public void setType(int type) {
085: this .type = type;
086: }
087:
088: public String getSchemaName() {
089: return schemaName;
090: }
091:
092: public void setSchemaName(String schemaName) {
093: this .schemaName = schemaName;
094: }
095:
096: public String getCatalogName() {
097: return catalogName;
098: }
099:
100: public void setCatalogName(String catalogName) {
101: this .catalogName = catalogName;
102: }
103:
104: public String getMetaDataKey() {
105: return metaDataKey;
106: }
107:
108: public void setMetaDataKey(String metaDataKey) {
109: this .metaDataKey = metaDataKey;
110: }
111:
112: public String getName() {
113: return name;
114: }
115:
116: public void setName(String name) {
117: this .name = name;
118: }
119:
120: public String toString() {
121: return name;
122: }
123:
124: public String getRemarks() {
125: return remarks;
126: }
127:
128: public void setRemarks(String remarks) {
129: this .remarks = remarks;
130: }
131:
132: public boolean isDefaultCatalog() {
133: return defaultCatalog;
134: }
135:
136: public void setDefaultCatalog(boolean defaultCatalog) {
137: this .defaultCatalog = defaultCatalog;
138: }
139:
140: public String getParentName() {
141: return parentName;
142: }
143:
144: public void setParentName(String parentName) {
145: this .parentName = parentName;
146: }
147:
148: public boolean isUseInQuery() {
149: return useInQuery;
150: }
151:
152: public void setUseInQuery(boolean useInQuery) {
153: this .useInQuery = useInQuery;
154: }
155:
156: public boolean isSystemObject() {
157: return systemObject;
158: }
159:
160: public void setSystemObject(boolean systemObject) {
161: this.systemObject = systemObject;
162: }
163:
164: }
|