001: package com.salmonllc.xml;
002:
003: /////////////////////////
004: //$Archive: /SOFIA/SourceCode/com/salmonllc/xml/ColumnMetaData.java $
005: //$Author: Len $
006: //$Revision: 20 $
007: //$Modtime: 6/17/03 2:13p $
008: /////////////////////////
009: /**
010: * This object serves the purpose of the header of each column in the XML File
011: * Creation date: (6/19/01 3:40:47 PM)
012: * @author Deepak Agarwal
013: */
014: public class ColumnMetaData {
015: private String fieldComponent = null;
016: private String fieldComponentType = null;
017:
018: private String fieldInternalName = null;
019: private String fieldColumnName = null;
020: private String fieldColumnType = null;
021:
022: private boolean fieldNullable = false;
023: private boolean fieldPrimaryKey = false;
024: private boolean fieldAutoIncrement = false;
025:
026: private boolean fieldSearchDisplay = false;
027: private boolean fieldDetailDisplay = false;
028: private boolean fieldListDisplay = false;
029:
030: private String fieldTable = null;
031: private String fieldSchema = null;
032: private boolean fieldNotBound = true;
033: private String fieldOnClick = null;
034:
035: private String fieldMode = null;
036: private String fieldCaption = null;
037: private boolean fieldLocked = false;
038: private boolean fieldPrecedence = false;
039: private boolean fieldExactMatch = false;
040: private boolean fieldLeadingWildCard = false;
041: private boolean fieldCaseSensitive = false;
042: private String fieldFormat = null;
043: private String fieldMaxLength = null;
044: private String fieldSize = null;
045: private String fieldHref = null;
046: private boolean fieldMandatory = true;
047: private Options fieldValues = null;
048: private Options fieldParms = null;
049:
050: private boolean fieldAdvanceSearch = true;
051:
052: private boolean fieldBucket = false;
053: private boolean fieldUpdateable = true;
054: private boolean fieldSameRow = false;
055: private boolean fieldReadOnly = false;
056: private boolean fieldOrderBy = false;
057: private String fieldDefaultValue = "";
058: private String fieldImageFile = "";
059: private String fieldJoinTo = "";
060:
061: /**
062: * Column constructor comment.
063: */
064: public ColumnMetaData() {
065: super ();
066: }
067:
068: /**
069: * Gets the column Caption
070: * Creation date: (7/20/01 12:09:40 PM)
071: * @return java.lang.String
072: */
073: public java.lang.String getCaption() {
074: return fieldCaption;
075: }
076:
077: /**
078: * Gets the column name.
079: * Creation date: (7/20/01 12:09:40 PM)
080: * @return java.lang.String
081: */
082: public java.lang.String getColumnName() {
083: return fieldColumnName;
084: }
085:
086: /**
087: * Gets the Column Type
088: * Creation date: (7/20/01 12:09:40 PM)
089: * @return java.lang.String
090: */
091: public java.lang.String getColumnType() {
092: return fieldColumnType;
093: }
094:
095: /**
096: * Gets the component used by Column
097: * Creation date: (7/20/01 12:09:40 PM)
098: * @return java.lang.String
099: */
100: public java.lang.String getComponent() {
101: return fieldComponent;
102: }
103:
104: /**
105: * Gets the Column Component Type
106: * Creation date: (7/20/01 12:09:40 PM)
107: * @return java.lang.String
108: */
109: public java.lang.String getComponentType() {
110: return fieldComponentType;
111: }
112:
113: /**
114: * Gets the Column default value
115: * Creation date: (8/10/01 2:02:21 PM)
116: * @return java.lang.String
117: */
118: public java.lang.String getDefaultValue() {
119: return fieldDefaultValue;
120: }
121:
122: /**
123: * Gets the format used by the Column
124: * Creation date: (7/23/01 10:10:14 AM)
125: * @return java.lang.String
126: */
127: public java.lang.String getFormat() {
128: return fieldFormat;
129: }
130:
131: /**
132: * Gets the link used by the column
133: * Creation date: (7/25/01 11:06:03 AM)
134: * @return java.lang.String
135: */
136: public java.lang.String getHref() {
137: return fieldHref;
138: }
139:
140: /**
141: * Gets the Image file name for the column
142: * Creation date: (8/16/01 11:31:40 AM)
143: * @return java.lang.String
144: */
145: public java.lang.String getImageFile() {
146: return fieldImageFile;
147: }
148:
149: /**
150: * Gets the internal name for the component
151: * Creation date: (7/20/01 12:09:40 PM)
152: * @return java.lang.String
153: */
154: public java.lang.String getInternalName() {
155: return fieldInternalName;
156: }
157:
158: /**
159: * Insert the method's description here.
160: * Creation date: (8/2/2002 10:35:23 AM)
161: * @return java.lang.String
162: */
163: public java.lang.String getJoinTo() {
164: return fieldJoinTo;
165: }
166:
167: /**
168: * Gets the Mode of the Column.
169: * Creation date: (7/20/01 12:09:40 PM)
170: * @return java.lang.String
171: */
172: public java.lang.String getMode() {
173: return fieldMode;
174: }
175:
176: /**
177: * Gets the params, options, for the columns
178: * Creation date: (8/1/2002 3:21:59 PM)
179: * @return com.salmonllc.xml.Options
180: */
181: public Options getParms() {
182: return fieldParms;
183: }
184:
185: /**
186: * Gets the Schema Name for the Column
187: * Creation date: (7/20/01 12:09:40 PM)
188: * @return java.lang.String
189: */
190: public java.lang.String getSchema() {
191: return fieldSchema;
192: }
193:
194: /**
195: * Gets the table name for the column
196: * Creation date: (7/20/01 12:09:40 PM)
197: * @return java.lang.String
198: */
199: public java.lang.String getTable() {
200: return fieldTable;
201: }
202:
203: /**
204: * Gets the values, options, for the columns
205: * Creation date: (7/26/01 2:02:04 PM)
206: * @return com.salmonllc.xml.Values
207: */
208: public Options getValues() {
209: return fieldValues;
210: }
211:
212: /**
213: * Gets the flag ' is advance search allowed'
214: * Creation date: (7/30/01 11:11:39 AM)
215: * @return boolean
216: */
217: public boolean isAdvanceSearch() {
218: return fieldAdvanceSearch;
219: }
220:
221: /**
222: * Gets the flag if the column is just a bucket not a column from a database table
223: * Creation date: (8/10/01 11:14:23 AM)
224: * @return boolean
225: */
226: public boolean isBucket() {
227: return fieldBucket;
228: }
229:
230: /**
231: * Gets the flag if the search should be case sensitive or not
232: * Creation date: (7/20/01 12:09:40 PM)
233: * @return boolean
234: */
235: public boolean isCaseSensitive() {
236: return fieldCaseSensitive;
237: }
238:
239: /**
240: * Gets the flag if the column is used in Detail Form
241: * Creation date: (7/25/01 10:49:31 AM)
242: * @return boolean
243: */
244: public boolean isDetailDisplay() {
245: return fieldDetailDisplay;
246: }
247:
248: /**
249: * Gets the flag if the search perfomed on this column should use Exact match or not
250: * Creation date: (7/20/01 12:09:40 PM)
251: * @return boolean
252: */
253: public boolean isExactMatch() {
254: return fieldExactMatch;
255: }
256:
257: /**
258: * Gets the flag if the column should be used with wild card search or not
259: * Creation date: (7/20/01 12:09:40 PM)
260: * @return java.lang.String
261: */
262: public boolean isLeadingWildCard() {
263: return fieldLeadingWildCard;
264: }
265:
266: /**
267: * Gets the flag if the column is used in List Form
268: * Creation date: (7/25/01 10:49:31 AM)
269: * @return boolean
270: */
271: public boolean isListDisplay() {
272: return fieldListDisplay;
273: }
274:
275: /**
276: * Gets the flag if column is locked
277: * Creation date: (7/20/01 12:09:40 PM)
278: * @return boolean
279: */
280: public boolean isLocked() {
281: return fieldLocked;
282: }
283:
284: /**
285: * Gets the flag if column is mandatory
286: * Creation date: (7/25/01 4:02:56 PM)
287: * @return boolean
288: */
289: public boolean isMandatory() {
290: return fieldMandatory;
291: }
292:
293: /**
294: * Gets the flag if the column is Nullable
295: * Creation date: (7/20/01 12:09:40 PM)
296: * @return boolean
297: */
298: public boolean isNullable() {
299: return fieldNullable;
300: }
301:
302: /**
303: * Gets the precendence order of column
304: * Creation date: (8/10/01 11:34:34 AM)
305: * @return boolean
306: */
307: public boolean isPrecedence() {
308: return fieldPrecedence;
309: }
310:
311: /**
312: * Gets the flag if the column is a part of primary key or not
313: * Creation date: (7/20/01 12:09:40 PM)
314: * @return boolean
315: */
316: public boolean isPrimaryKey() {
317: return fieldPrimaryKey;
318: }
319:
320: /**
321: * Gets the flag if column is read only or not
322: * Creation date: (8/10/01 11:32:06 AM)
323: * @return boolean
324: */
325: public boolean isReadOnly() {
326: return fieldReadOnly;
327: }
328:
329: /**
330: * Gets the flag if column is added to "ORDER BY" SQL clause
331: * Creation date: (8/10/01 11:32:06 AM)
332: * @return boolean
333: */
334: public boolean isOrderBy() {
335: return fieldOrderBy;
336: }
337:
338: /**
339: * Gets the falg if column is displayed in same row or not
340: * Creation date: (8/10/01 11:14:23 AM)
341: * @return boolean
342: */
343: public boolean isSameRow() {
344: return fieldSameRow;
345: }
346:
347: /**
348: * Gets the flag if column should be dispalyed in search form or not
349: * Creation date: (7/25/01 10:49:31 AM)
350: * @return boolean
351: */
352: public boolean isSearchDisplay() {
353: return fieldSearchDisplay;
354: }
355:
356: /**
357: * Gets the flag if column is updateable
358: * Creation date: (8/10/01 11:14:23 AM)
359: * @return boolean
360: */
361: public boolean isUpdateable() {
362: return fieldUpdateable;
363: }
364:
365: /**
366: * Sets the advance search link
367: * Creation date: (7/30/01 11:11:39 AM)
368: * @param newAdvanceSearch boolean
369: */
370: public void setAdvanceSearch(boolean newAdvanceSearch) {
371: fieldAdvanceSearch = newAdvanceSearch;
372: }
373:
374: /**
375: * Sets the flag if column is a bucket
376: * Creation date: (8/10/01 11:14:23 AM)
377: * @param newBucket boolean
378: */
379: public void setBucket(boolean newBucket) {
380: fieldBucket = newBucket;
381: }
382:
383: /**
384: * Sets the caption for a column.
385: * Creation date: (7/20/01 12:09:40 PM)
386: * @param newCaption java.lang.String
387: */
388: public void setCaption(java.lang.String newCaption) {
389: fieldCaption = newCaption;
390: }
391:
392: /**
393: * Sets the flag on a column if the search perfomed is case sensitive or not
394: * Creation date: (7/20/01 12:09:40 PM)
395: * @param newCaseSensitive boolean
396: */
397: public void setCaseSensitive(boolean newCaseSensitive) {
398: fieldCaseSensitive = newCaseSensitive;
399: }
400:
401: /**
402: * Sets the column name
403: * Creation date: (7/20/01 12:09:40 PM)
404: * @param newColumnName java.lang.String
405: */
406: public void setColumnName(java.lang.String newColumnName) {
407: fieldColumnName = newColumnName;
408: }
409:
410: /**
411: * Sets the column type
412: * Creation date: (7/20/01 12:09:40 PM)
413: * @param newColumnType java.lang.String
414: */
415: public void setColumnType(java.lang.String newColumnType) {
416: fieldColumnType = newColumnType;
417: }
418:
419: /**
420: * Sets the component to be used by column
421: * Creation date: (7/20/01 12:09:40 PM)
422: * @param newComponent java.lang.String
423: */
424: public void setComponent(java.lang.String newComponent) {
425: fieldComponent = newComponent;
426: }
427:
428: /**
429: * Sets the component type for the column
430: * Creation date: (7/20/01 12:09:40 PM)
431: * @param newComponentType java.lang.String
432: */
433: public void setComponentType(java.lang.String newComponentType) {
434: fieldComponentType = newComponentType;
435: }
436:
437: /**
438: * Sets the default value for the column
439: * Creation date: (8/10/01 2:02:21 PM)
440: * @param newDefaultValue java.lang.String
441: */
442: public void setDefaultValue(java.lang.String newDefaultValue) {
443: fieldDefaultValue = newDefaultValue;
444: }
445:
446: /**
447: * Sets the detail display flag for the column
448: * Creation date: (7/25/01 10:49:31 AM)
449: * @param newDetailDisplay boolean
450: */
451: public void setDetailDisplay(boolean newDetailDisplay) {
452: fieldDetailDisplay = newDetailDisplay;
453: }
454:
455: /**
456: * Sets the exact match flag for the column
457: * Creation date: (7/20/01 12:09:40 PM)
458: * @param newExactMatch boolean
459: */
460: public void setExactMatch(boolean newExactMatch) {
461: fieldExactMatch = newExactMatch;
462: }
463:
464: /**
465: * Sets the format to be used by the column
466: * Creation date: (7/23/01 10:10:14 AM)
467: * @param newFormat java.lang.String
468: */
469: public void setFormat(java.lang.String newFormat) {
470: fieldFormat = newFormat;
471: }
472:
473: /**
474: * Sets the link if used by the column for display
475: * Creation date: (7/25/01 11:06:03 AM)
476: * @param newHref java.lang.String
477: */
478: public void setHref(java.lang.String newHref) {
479: fieldHref = newHref;
480: }
481:
482: /**
483: * Sets the Image file name if used by column
484: * Creation date: (8/16/01 11:31:40 AM)
485: * @param newImageFile java.lang.String
486: */
487: public void setImageFile(java.lang.String newImageFile) {
488: fieldImageFile = newImageFile;
489: }
490:
491: /**
492: * Sets the internal name of the column
493: * Creation date: (7/20/01 12:09:40 PM)
494: * @param newInternalName java.lang.String
495: */
496: public void setInternalName(java.lang.String newInternalName) {
497: fieldInternalName = newInternalName;
498: }
499:
500: /**
501: * Insert the method's description here.
502: * Creation date: (8/2/2002 10:35:23 AM)
503: * @param newJoinTo java.lang.String
504: */
505: public void setJoinTo(java.lang.String newJoinTo) {
506: fieldJoinTo = newJoinTo;
507: }
508:
509: /**
510: * Sets the leading wild card flag for the column
511: * Creation date: (7/20/01 12:09:40 PM)
512: * @param newLeadingWildCard java.lang.String
513: */
514: public void setLeadingWildCard(boolean newLeadingWildCard) {
515: fieldLeadingWildCard = newLeadingWildCard;
516: }
517:
518: /**
519: * Sets the list display flag for the column
520: * Creation date: (7/25/01 10:49:31 AM)
521: * @param newListDisplay boolean
522: */
523: public void setListDisplay(boolean newListDisplay) {
524: fieldListDisplay = newListDisplay;
525: }
526:
527: /**
528: * Sets the licked flag for the column
529: * Creation date: (7/20/01 12:09:40 PM)
530: * @param newLocked boolean
531: */
532: public void setLocked(boolean newLocked) {
533: fieldLocked = newLocked;
534: }
535:
536: /**
537: * Sets the mandatory flag for the columns
538: * Creation date: (7/25/01 4:02:56 PM)
539: * @param newMandatory boolean
540: */
541: public void setMandatory(boolean newMandatory) {
542: fieldMandatory = newMandatory;
543: }
544:
545: /**
546: * Sets the mode for the column
547: * Creation date: (7/20/01 12:09:40 PM)
548: * @param newMode java.lang.String
549: */
550: public void setMode(java.lang.String newMode) {
551: fieldMode = newMode;
552: }
553:
554: /**
555: * Sets the flag if the column is nullable
556: * Creation date: (7/20/01 12:09:40 PM)
557: * @param newNullable boolean
558: */
559: public void setNullable(boolean newNullable) {
560: fieldNullable = newNullable;
561: }
562:
563: /**
564: * Sets the params, options, for the columns
565: * Creation date: (8/1/2002 3:21:59 PM)
566: * @param newParms com.salmonllc.xml.Options
567: */
568: public void setParms(Options newParms) {
569: fieldParms = newParms;
570: }
571:
572: /**
573: * Sets the precedence for the column while searching
574: * Creation date: (8/10/01 11:34:34 AM)
575: * @param newPrecedence boolean
576: */
577: public void setPrecedence(boolean newPrecedence) {
578: fieldPrecedence = newPrecedence;
579: }
580:
581: /**
582: * Sets if the column is a part of primary key
583: * Creation date: (7/20/01 12:09:40 PM)
584: * @param newPrimaryKey boolean
585: */
586: public void setPrimaryKey(boolean newPrimaryKey) {
587: fieldPrimaryKey = newPrimaryKey;
588: }
589:
590: /**
591: * Sets the flag if the column is read only
592: * Creation date: (8/10/01 11:32:06 AM)
593: * @param newReadOnly boolean
594: */
595: public void setReadOnly(boolean newReadOnly) {
596: fieldReadOnly = newReadOnly;
597: }
598:
599: /**
600: * Sets the flag if the column will be in the "ORDER BY" clause
601: * Creation date: (8/10/01 11:32:06 AM)
602: * @param newOrderByColumn boolean
603: */
604: public void setOrderByColumn(boolean newOrderByColumn) {
605: fieldOrderBy = newOrderByColumn;
606: }
607:
608: /**
609: * Sets the flag if column is part if the same row as the pervious component was
610: * Creation date: (8/10/01 11:14:23 AM)
611: * @param newSameRow boolean
612: */
613: public void setSameRow(boolean newSameRow) {
614: fieldSameRow = newSameRow;
615: }
616:
617: /**
618: * sets the schema, if present for the column name
619: * Creation date: (7/20/01 12:09:40 PM)
620: * @param newSchema java.lang.String
621: */
622: public void setSchema(java.lang.String newSchema) {
623: fieldSchema = newSchema;
624: }
625:
626: /**
627: * Sets the search display flag for the column
628: * Creation date: (7/25/01 10:49:31 AM)
629: * @param newSearchDisplay boolean
630: */
631: public void setSearchDisplay(boolean newSearchDisplay) {
632: fieldSearchDisplay = newSearchDisplay;
633: }
634:
635: /**
636: * Sets the table name for the column
637: * Creation date: (7/20/01 12:09:40 PM)
638: * @param newTable java.lang.String
639: */
640: public void setTable(java.lang.String newTable) {
641: fieldTable = newTable;
642: }
643:
644: /**
645: * Sets the flag if column is updateable
646: * Creation date: (8/10/01 11:14:23 AM)
647: * @param newUpdateable boolean
648: */
649: public void setUpdateable(boolean newUpdateable) {
650: fieldUpdateable = newUpdateable;
651: }
652:
653: /**
654: * Sets the options for a column - this can be from anywhere
655: * Creation date: (7/26/01 2:02:04 PM)
656: * @param newValues com.salmonllc.xml.Values
657: */
658: public void setValues(Options newValues) {
659: fieldValues = newValues;
660: }
661:
662: public String getMaxLength() {
663: return fieldMaxLength;
664: }
665:
666: public void setMaxLength(String fieldMaxLength) {
667: this .fieldMaxLength = fieldMaxLength;
668: }
669:
670: public String getSize() {
671: return fieldSize;
672: }
673:
674: public void setSize(String newSize) {
675: this .fieldSize = newSize;
676: }
677:
678: public boolean isAutoIncrement() {
679: return fieldAutoIncrement;
680: }
681:
682: public void setAutoIncrement(boolean fieldAutoIncrement) {
683: this .fieldAutoIncrement = fieldAutoIncrement;
684: }
685:
686: public boolean isNotBound() {
687: return fieldNotBound;
688: }
689:
690: public void setNotBound(boolean fieldNotBound) {
691: this .fieldNotBound = fieldNotBound;
692: }
693:
694: public String getOnClick() {
695: return fieldOnClick;
696: }
697:
698: public void setOnClick(String onClick) {
699: this.fieldOnClick = onClick;
700: }
701: }
|