001: package net.sourceforge.squirrel_sql.plugins.SybaseASE.prefs;
002:
003: /*
004: * Copyright (C) 2007 Rob Manning
005: * manningr@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: import java.io.Serializable;
022:
023: import net.sourceforge.squirrel_sql.fw.preferences.IQueryTokenizerPreferenceBean;
024:
025: /**
026: * A bean class to store preferences for the Sybase plugin.
027: */
028: public class SybasePreferenceBean implements Cloneable, Serializable,
029: IQueryTokenizerPreferenceBean {
030:
031: static final long serialVersionUID = 3722068008392095286L;
032:
033: static final String UNSUPPORTED = "Unsupported";
034:
035: /** Client Name. */
036: private String _clientName;
037:
038: /** Client version. */
039: private String _clientVersion;
040:
041: private String statementSeparator = "GO";
042:
043: private String lineComment = "--";
044:
045: private boolean removeMultiLineComments = false;
046:
047: private boolean installCustomQueryTokenizer = true;
048:
049: public SybasePreferenceBean() {
050: super ();
051: }
052:
053: /**
054: * Return a copy of this object.
055: */
056: public Object clone() {
057: try {
058: return super .clone();
059: } catch (CloneNotSupportedException ex) {
060: throw new InternalError(ex.getMessage()); // Impossible.
061: }
062: }
063:
064: /**
065: * Retrieve the client to use. This is only
066: * used if <TT>useAnonymousClient</TT> is false.
067: *
068: * @return Client name.
069: */
070: public String getClientName() {
071: return _clientName;
072: }
073:
074: /**
075: * Set the client name.
076: *
077: * @param value Client name
078: */
079: public void setClientName(String value) {
080: _clientName = value;
081: }
082:
083: /**
084: * Retrieve the client version to use. This is only
085: * used if <TT>useAnonymousLogon</TT> is false.
086: *
087: * @return Client version.
088: */
089: public String getClientVersion() {
090: return _clientVersion;
091: }
092:
093: /**
094: * Set the client version.
095: *
096: * @param value Client version
097: */
098: public void setClientVersion(String value) {
099: _clientVersion = value;
100: }
101:
102: /**
103: * @param statementSeparator the statementSeparator to set
104: */
105: public void setStatementSeparator(String statementSeparator) {
106: this .statementSeparator = statementSeparator;
107: }
108:
109: /**
110: * @return the statementSeparator
111: */
112: public String getStatementSeparator() {
113: return statementSeparator;
114: }
115:
116: /**
117: * @param lineComment the lineComment to set
118: */
119: public void setLineComment(String lineComment) {
120: this .lineComment = lineComment;
121: }
122:
123: /**
124: * @return the lineComment
125: */
126: public String getLineComment() {
127: return lineComment;
128: }
129:
130: /**
131: * @param removeMultiLineComments the removeMultiLineComments to set
132: */
133: public void setRemoveMultiLineComments(
134: boolean removeMultiLineComments) {
135: this .removeMultiLineComments = removeMultiLineComments;
136: }
137:
138: /**
139: * @return the removeMultiLineComments
140: */
141: public boolean isRemoveMultiLineComments() {
142: return removeMultiLineComments;
143: }
144:
145: /**
146: * @param installCustomQueryTokenizer the installCustomQueryTokenizer to set
147: */
148: public void setInstallCustomQueryTokenizer(
149: boolean installCustomQueryTokenizer) {
150: this .installCustomQueryTokenizer = installCustomQueryTokenizer;
151: }
152:
153: /**
154: * @return the installCustomQueryTokenizer
155: */
156: public boolean isInstallCustomQueryTokenizer() {
157: return installCustomQueryTokenizer;
158: }
159:
160: /**
161: * This is not implemented at the moment, but will be soon.
162: * @see net.sourceforge.squirrel_sql.fw.preferences.IQueryTokenizerPreferenceBean#getProcedureSeparator()
163: */
164: public String getProcedureSeparator() {
165: return null;
166: }
167:
168: /**
169: * This is not implemented at the moment, but will be soon.
170: * @see net.sourceforge.squirrel_sql.fw.preferences.IQueryTokenizerPreferenceBean#setProcedureSeparator(java.lang.String)
171: */
172: public void setProcedureSeparator(String procedureSeparator) {
173:
174: }
175:
176: }
|