001: package net.sourceforge.squirrel_sql.plugins.mysql.util;
002:
003: /*
004: * Copyright (C) 2003 Arun Kapilan.P
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or (at your option) any later version.
010: *
011: * This library 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 GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: */
020:
021: /*
022: * FieldDetails.java
023: *
024: * Created on June 16, 2003, 11:29 AM
025: *
026: * @author Arun Kapilan.P
027: */
028: public class FieldDetails {
029: private String fieldName = null;
030: private String fieldType = null;
031: private String fieldLength = null;
032: private String fieldDefault = null;
033: private boolean isPrimary = false;
034: private boolean isIndex = false;
035: private boolean isUnique = false;
036: private boolean isBinary = false;
037: private boolean isNotNull = false;
038: private boolean isUnsigned = false;
039: private boolean isAutoIncrement = false;
040: private boolean isZeroFill = false;
041:
042: public void setFieldName(String fieldName) {
043: this .fieldName = fieldName;
044: }
045:
046: public void setFieldType(String fieldType) {
047: this .fieldType = fieldType;
048: }
049:
050: public void setFieldLength(String fieldLength) {
051: this .fieldLength = fieldLength;
052: }
053:
054: public void setDefault(String fieldDefault) {
055: this .fieldDefault = fieldDefault;
056: }
057:
058: public void setPrimary(boolean isPrimary) {
059: this .isPrimary = isPrimary;
060: }
061:
062: public void setUnique(boolean isUnique) {
063: this .isUnique = isUnique;
064: }
065:
066: public void setIndex(boolean isIndex) {
067: this .isIndex = isIndex;
068: }
069:
070: public void setBinary(boolean isBinary) {
071: this .isBinary = isBinary;
072: }
073:
074: public void setNotNull(boolean isNotNull) {
075: this .isNotNull = isNotNull;
076: }
077:
078: public void setUnisigned(boolean isUnsigned) {
079: this .isUnsigned = isUnsigned;
080: }
081:
082: public void setAutoIncrement(boolean isAutoIncrement) {
083: this .isAutoIncrement = isAutoIncrement;
084: }
085:
086: public void setZeroFill(boolean isZeroFill) {
087: this .isZeroFill = isZeroFill;
088: }
089:
090: public String getFieldName() {
091: return this .fieldName;
092: }
093:
094: public String getFieldType() {
095: return this .fieldType;
096: }
097:
098: public String getFieldLength() {
099: return this .fieldLength;
100: }
101:
102: public String getDefault() {
103: return this .fieldDefault;
104: }
105:
106: public boolean IsUnique() {
107: return this .isUnique;
108: }
109:
110: public boolean IsIndex() {
111: return this .isIndex;
112: }
113:
114: public boolean IsPrimary() {
115: return this .isPrimary;
116: }
117:
118: public boolean IsBinary() {
119: return this .isBinary;
120: }
121:
122: public boolean IsNotNull() {
123: return this .isNotNull;
124: }
125:
126: public boolean IsUnisigned() {
127: return this .isUnsigned;
128: }
129:
130: public boolean IsAutoIncrement() {
131: return this .isAutoIncrement;
132: }
133:
134: public boolean IsZeroFill() {
135: return this .isZeroFill;
136: }
137:
138: public String toString() {
139: return getFieldName();
140: }
141: }
|