001: /*
002: * ColumnIndex.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: /* ----------------------------------------------------------
025: * CVS NOTE: Changes to the CVS repository prior to the
026: * release of version 3.0.0beta1 has meant a
027: * resetting of CVS revision numbers.
028: * ----------------------------------------------------------
029: */
030:
031: /**
032: * This object maintains table index data
033: * as retrieved from the <code>DatabaseMetaData</code>
034: * method <code>getIndexInfo(...)</code> for a particular table
035: * as selected within the Database Browser.<br>
036: *
037: * @author Takis Diakoumis
038: * @version $Revision: 1.5 $
039: * @date $Date: 2006/09/26 16:25:30 $
040: */
041: public class ColumnIndex {
042:
043: /** Whether the index is non-unique */
044: private boolean non_unique;
045:
046: /** The index name */
047: private String name;
048:
049: /** The indexed column */
050: private String column;
051:
052: /** The index type */
053: private int type;
054:
055: /** Whether this a new index value */
056: private boolean markedNew;
057:
058: /** Whether this column is marked as to be deleted */
059: private boolean markedDeleted;
060:
061: public ColumnIndex() {
062: }
063:
064: public void setIndexType(int type) {
065: this .type = type;
066: }
067:
068: public void setIndexedColumn(String column) {
069: this .column = column;
070: }
071:
072: public String getIndexedColumn() {
073: return column;
074: }
075:
076: public String getIndexName() {
077: return name;
078: }
079:
080: public void setIndexName(String name) {
081: this .name = name;
082: }
083:
084: public void setNonUnique(boolean non_unique) {
085: this .non_unique = non_unique;
086: }
087:
088: public boolean isNonUnique() {
089: return non_unique;
090: }
091:
092: public String toString() {
093: return name;
094: }
095:
096: public boolean isMarkedNew() {
097: return markedNew;
098: }
099:
100: public void setMarkedNew(boolean markedNew) {
101: this .markedNew = markedNew;
102: }
103:
104: public boolean isMarkedDeleted() {
105: return markedDeleted;
106: }
107:
108: public void setMarkedDeleted(boolean markedDeleted) {
109: this.markedDeleted = markedDeleted;
110: }
111:
112: }
|