001: package org.firebirdsql.squirrel.util;
002:
003: /*
004: * Copyright (C) 2004 Colin Bell
005: * colbell@users.sourceforge.net
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or (at your option) any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: */
021: /**
022: * This class contains information about an Index.
023: *
024: * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
025: */
026: public class IndexInfo {
027: /**
028: * JavaBean property names for this class.
029: */
030: public interface IPropertyNames {
031: String ACTIVE = "active";
032: String DESCRIPTION = "description";
033: String EXPRESSION_SOURCE = "expressionSource";
034: String FOREIGN_KEY_CONSTRAINT = "foreignKeyConstraintName";
035: String ID = "id";
036: String NAME = "name";
037: String RELATION_NAME = "relationName";
038: String SEGMENT_COUNT = "segmentCount";
039: String SYSTEM_DEFINED = "systemDefined";
040: String UNIQUE = "unique";
041: }
042:
043: private String _name;
044: private String _description;
045: private int _id;
046: private String _relationName;
047: private boolean _unique;
048: private int _segmentCount;
049: private boolean _active;
050: private boolean _isSystemDefined;
051: private String _foreignKeyConstraint;
052: private String _expressionSource;
053:
054: public IndexInfo(String name, String description, int id,
055: String relationName, int unique, int segmentCount,
056: int inactive, int isSystemDefined,
057: String foreignKeyConstraint, String expressionSource) {
058: super ();
059:
060: _name = name;
061: _description = description;
062: _id = id;
063: _relationName = relationName;
064: _unique = unique == 1;
065: _segmentCount = segmentCount;
066: _active = inactive == 0;
067: _isSystemDefined = isSystemDefined > 0;
068: _foreignKeyConstraint = foreignKeyConstraint;
069: _expressionSource = expressionSource;
070: }
071:
072: public String getName() {
073: return _name;
074: }
075:
076: public void setName(String value) {
077: _name = value;
078: }
079:
080: public String getDescription() {
081: return _description;
082: }
083:
084: public void setDescription(String value) {
085: _description = value;
086: }
087:
088: public String getRelationName() {
089: return _relationName;
090: }
091:
092: public void setRelationName(String value) {
093: _description = value;
094: }
095:
096: public int getId() {
097: return _id;
098: }
099:
100: public void setId(int value) {
101: _id = value;
102: }
103:
104: public boolean isUnique() {
105: return _unique;
106: }
107:
108: public void setUnique(boolean value) {
109: _unique = value;
110: }
111:
112: public int getSegmentCount() {
113: return _segmentCount;
114: }
115:
116: public void setSegmentCount(int value) {
117: _segmentCount = value;
118: }
119:
120: public boolean isActive() {
121: return _active;
122: }
123:
124: public void setActive(boolean value) {
125: _active = value;
126: }
127:
128: public boolean isSystemDefined() {
129: return _isSystemDefined;
130: }
131:
132: public void setSystemDefined(boolean value) {
133: _isSystemDefined = value;
134: }
135:
136: public String getForeignKeyConstraintName() {
137: return _foreignKeyConstraint;
138: }
139:
140: public void setForeignKeyConstraintName(String value) {
141: _foreignKeyConstraint = value;
142: }
143:
144: public String getExpressionSource() {
145: return _expressionSource;
146: }
147:
148: public void setExpressionSource(String value) {
149: _expressionSource = value;
150: }
151: }
|