0001: //** Copyright Statement ***************************************************
0002: //The Salmon Open Framework for Internet Applications (SOFIA)
0003: // Copyright (C) 1999 - 2002, Salmon LLC
0004: //
0005: // This program is free software; you can redistribute it and/or
0006: // modify it under the terms of the GNU General Public License version 2
0007: // as published by the Free Software Foundation;
0008: //
0009: // This program is distributed in the hope that it will be useful,
0010: // but WITHOUT ANY WARRANTY; without even the implied warranty of
0011: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0012: // GNU General Public License for more details.
0013: //
0014: // You should have received a copy of the GNU General Public License
0015: // along with this program; if not, write to the Free Software
0016: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
0017: //
0018: // For more information please visit http://www.salmonllc.com
0019: //** End Copyright Statement ***************************************************
0020: package com.salmonllc.sql;
0021:
0022: /////////////////////////
0023: //$Archive: /SOFIA/SourceCode/com/salmonllc/sql/DataStoreInterface.java $
0024: //$Author: Dan $
0025: //$Revision: 11 $
0026: //$Modtime: 11/01/04 4:21p $
0027: /////////////////////////
0028:
0029: import java.util.*;
0030: import java.sql.*;
0031:
0032: /**
0033: * This interface is implemented by both the DataStore and DataStoreProxy and is useful for components that need to retrieve data but need to user the DataStore and DataStoreProxy interchangably
0034: */
0035: public interface DataStoreInterface extends DataStoreQBEInterface {
0036: /**
0037: * This method adds a bucket to the DataStoreBuffer. The bucket will be filled in with nulls when the datastore is retrieved.
0038: * @param internalname The name of the bucket to add to the datastore.
0039: * @param type The type of the column to add to the datastore. This must be one of the "TYPE" constants in the class.
0040: */
0041: public void addBucket(String internalname, int type);
0042:
0043: /**
0044: * This method indicates whether all the data in the result set that is to be returned by the last retrieve statement has in fact been retrieved.
0045: * @return true if all the data has been retrieved and false if the retrieve is still in progress.
0046: */
0047: public boolean allDataRetrieved();
0048:
0049: /**
0050: * This method was created in VisualAge.
0051: */
0052: public void cancelRetrieve();
0053:
0054: /**
0055: * This method will compare the contents of two rows using the specified column list. It will return < 0 if row1 is less then row2, 0 if they are equal and > 0 if row1 is greater than row2
0056: * @param row1 the first row to check
0057: * @param row2 the next row to check
0058: * @param cols An array of column numbers to use for the comparison
0059: */
0060: public int compareRows(int row1, int row2, int[] cols);
0061:
0062: /**
0063: * This method will compare the contents of two rows using the specified column list. It will return < 0 if row1 is less then row2, 0 if they are equal and > 0 if row1 is greater than row2
0064: * @param row1 the first row to check
0065: * @param row2 the next row to check
0066: * @param cols An array of column names to use for the comparison
0067: */
0068: public int compareRows(int row1, int row2, String[] cols);
0069:
0070: /**
0071: * This deletes the current row in the DataStoreBuffer. This will generate a delete statment that will remove the row from the database when the update method is called.
0072: * @return true if the row is deleted and false if not.
0073: */
0074: public boolean deleteRow();
0075:
0076: /**
0077: * This deletes the row in the DataStoreBuffer. This will generate a delete statment that will remove the row from the database when the update method is called.
0078: * @param row The number of the row to delete.
0079: * @return True if the row is deleted and false if not.
0080: */
0081: public boolean deleteRow(int row);
0082:
0083: /**
0084: * This method will destroy the remote data store on the data server. All resources on the server will be reclaimed.
0085: */
0086: public void destroy() throws Exception;
0087:
0088: /**
0089: * Use this method to get the amount of rows that will be retrieved when a data store retrieve is executed.
0090: */
0091: public int estimateRowsRetrieved() throws Exception;
0092:
0093: /**
0094: * Use this method to get the amount of rows that will be retrieved when a data store retrieve is executed.
0095: * @param criteria The selection criteria to use for the select.
0096: */
0097: public int estimateRowsRetrieved(String criteria) throws Exception;
0098:
0099: /**
0100: * Exports the rows of the data store in the format specified.
0101: * @param format: Can be EXPORT_XML, EXPORT_HTML or EXPORT_TAB_DELIMITED;
0102: * @param includeHeaders: True if the output should contain column headings.
0103: * @param p: The PrintWriter to send the output to.
0104: */
0105: public void export(int format, boolean includeHeaders,
0106: java.io.PrintWriter p);
0107:
0108: /**
0109: * This method will remove all rows from the buffer that don't match the criteria and place them in the datastore's filter buffer.
0110: * The method is passed a String containing the filter expression that will be used.
0111: * Examples:<BR>
0112: * <pre>
0113: * ds.filter("table1.column1 == 'xxxx'); <BR>
0114: * ds.filter("table1.column1.substring(2,3) == table1.column2");<BR>
0115: * ds.filter("table1.column1.substring(2,3) == table1.column2 || table1.column3.startsWith('xxx')");<BR><BR>
0116: * </pre>
0117: * @param filter The criteria to filter on. Enter a value of null to clear the filter.
0118: * @see DataStoreEvaluator
0119: */
0120:
0121: public void filter(String filter) throws DataStoreException;
0122:
0123: /**
0124: * This method finds the next row in the result set that matches the criteria entered and is within the start and end range.
0125: * @start The first row in the DataStoreBuffer to search.
0126: * @end The last row in the DataStoreBuffer to search (Make start > end to search backwards).
0127: * @return Returns the first row matching the criteria within the range or -1 if none are found.
0128: * @see DataStore#setFindExpression
0129: */
0130: public int find(int start, int end) throws DataStoreException;
0131:
0132: /**
0133: * This method finds the firs row in the result set that matches the criteria entered and makes it the current row.
0134: * @return Returns false if no rows are found that match the criteria.
0135: * @see DataStoreBuffer#setFindExpression
0136: */
0137: public boolean findFirst() throws DataStoreException;
0138:
0139: /**
0140: * This method finds the last row in the result set that matches the criteria entered and makes it the current row.
0141: * @return Returns false if no rows are found that match the criteria.
0142: * @see DataStoreBuffer#setFindExpression
0143: */
0144: public boolean findLast() throws DataStoreException;
0145:
0146: /**
0147: * This method finds the next row in the result set that matches the criteria entered and makes it the current row.
0148: * @return Returns false if no rows are found that match the criteria.
0149: * @see DataStoreBuffer#setFindExpression
0150: */
0151: public boolean findNext() throws DataStoreException;
0152:
0153: /**
0154: * This method finds the next row in the result set that matches the criteria entered and makes it the current row.
0155: * @return Returns false if no rows are found that match the criteria.
0156: * @see DataStoreBuffer#setFindExpression
0157: */
0158: public boolean findPrior() throws DataStoreException;
0159:
0160: /**
0161: * This method return a Object value from the current row of the data store buffer.
0162: * @return The Object value
0163: * @param row The row number in the data store buffer.
0164: * @param column The column number in the data store buffer.
0165: */
0166: public Object getAny(int column) throws DataStoreException;
0167:
0168: /**
0169: * This method return a Object value from the data store buffer.
0170: * @return The Object value
0171: * @param row The row number in the data store buffer.
0172: * @param column The column number in the data store buffer.
0173: */
0174: public Object getAny(int row, int column) throws DataStoreException;
0175:
0176: /**
0177: * This method return a Object value from the data store buffer.
0178: * @return The Object value
0179: * @param row The row number in the data store buffer.
0180: * @param column The column name (in the form table.column) in the data store buffer.
0181: */
0182: public Object getAny(int row, String column)
0183: throws DataStoreException;
0184:
0185: /**
0186: * This method return a Object value from the current row of the data store buffer.
0187: * @return The Object value
0188: * @param row The row number in the data store buffer.
0189: * @param column The column name in the data store buffer.
0190: */
0191: public Object getAny(String column) throws DataStoreException;
0192:
0193: /**
0194: * This method return a byte array value from the current row in the data store buffer.
0195: * @return The byte array
0196: * @param column The column number in the data store buffer.
0197: */
0198: public byte[] getByteArray(int column) throws DataStoreException;
0199:
0200: /**
0201: * This method return a byte array value from the data store buffer.
0202: * @return The byte array
0203: * @param row The row number in the data store buffer.
0204: * @param column The column number in the data store buffer.
0205: */
0206: public byte[] getByteArray(int row, int column)
0207: throws DataStoreException;
0208:
0209: /**
0210: * This method return a byte array value from the data store buffer.
0211: * @return The byte array
0212: * @param row The row number in the data store buffer.
0213: * @param column The column name (in the form table.column) in the data store buffer.
0214: */
0215: public byte[] getByteArray(int row, String column)
0216: throws DataStoreException;
0217:
0218: /**
0219: * This method return a byte array value from the current row in the data store buffer.
0220: * @return The byte array
0221: * @param row The row number in the data store buffer.
0222: * @param column The column name (in the form table.column) in the data store buffer.
0223: */
0224: public byte[] getByteArray(String column) throws DataStoreException;
0225:
0226: /**
0227: * Use this method to get whether or not the datastore will do a concurrency check when rows are updated and deleted.
0228: */
0229: public boolean getCheckConcurrency();
0230:
0231: /**
0232: * This method returns the number of columns in the datastore.
0233: */
0234: public int getColumnCount();
0235:
0236: /**
0237: * This method returns the Data Type for a particular column.
0238: * @param column The column number in the data store buffer.
0239: */
0240:
0241: public int getColumnDataType(int column) throws DataStoreException;
0242:
0243: /**
0244: * This method returns the Data Type for a particular column.
0245: * @param column The column name in the data store buffer.
0246: */
0247:
0248: public int getColumnDataType(String column)
0249: throws DataStoreException;
0250:
0251: /**
0252: * This method returns a list with the names of all the columns in the data store.
0253: */
0254: public String[] getColumnList();
0255:
0256: /**
0257: * This method returns the name of the column in the data store given its index.
0258: */
0259: public String getColumnName(int col) throws DataStoreException;
0260:
0261: /**
0262: * This method is used to get whether a column should be used in the update, delete concurrency check.
0263: */
0264: public boolean getConcurrencyCheckColumn(int col)
0265: throws DataStoreException;
0266:
0267: /**
0268: * This method is used to get whether a column should be used in the update, delete concurrency check.
0269: */
0270: public boolean getConcurrencyCheckColumn(String col)
0271: throws DataStoreException;
0272:
0273: /**
0274: * This method is used to get selection criteria filtering for the result set of the datastore.
0275: */
0276: public String getCriteria();
0277:
0278: /**
0279: * This method gets the specified row from the DataStore.
0280: * @param rowNo The number of the row to get.
0281: * @param buffer The datastore buffer to look in. Valid values are BUFFER_STANDARD, BUFFER_DELETED, BUFFER_FILTERED.
0282: */
0283: public DataStoreRow getDataStoreRow(int rowNo, int buffer)
0284: throws DataStoreException;
0285:
0286: /**
0287: * This method return a date value from current row of the data store buffer.
0288: * @return The DateTime Value
0289: * @param column The column number in the data store buffer.
0290: */
0291: public java.sql.Date getDate(int column) throws DataStoreException;
0292:
0293: /**
0294: * This method return a date value from the data store buffer.
0295: * @return The DateTime Value
0296: * @param row The row number in the data store buffer.
0297: * @param column The column number in the data store buffer.
0298: */
0299: public java.sql.Date getDate(int row, int column)
0300: throws DataStoreException;
0301:
0302: /**
0303: * This method return a date value from the data store buffer.
0304: * @return The DateTime Value
0305: * @param row The row number in the data store buffer.
0306: * @param column The column name in the data store buffer.
0307: */
0308: public java.sql.Date getDate(int row, String column)
0309: throws DataStoreException;
0310:
0311: /**
0312: * This method return a date value from current row of the data store buffer.
0313: * @return The DateTime Value
0314: * @param column The column name in the data store buffer.
0315: */
0316: public java.sql.Date getDate(String column)
0317: throws DataStoreException;
0318:
0319: /**
0320: * This method return a date value from current row of the data store buffer.
0321: * @return The DateTime Value
0322: * @param column The column number in the data store buffer.
0323: */
0324: public Timestamp getDateTime(int column) throws DataStoreException;
0325:
0326: /**
0327: * This method return a date value from the data store buffer.
0328: * @return The DateTime Value
0329: * @param row The row number in the data store buffer.
0330: * @param column The column number in the data store buffer.
0331: */
0332: public Timestamp getDateTime(int row, int column)
0333: throws DataStoreException;
0334:
0335: /**
0336: * This method return a date value from the data store buffer.
0337: * @return The DateTime Value
0338: * @param row The row number in the data store buffer.
0339: * @param column The column name in the data store buffer.
0340: */
0341: public Timestamp getDateTime(int row, String column)
0342: throws DataStoreException;
0343:
0344: /**
0345: * This method return a datetime value from current row of the data store buffer.
0346: * @return The DateTime Value
0347: * @param column The column name in the data store buffer.
0348: */
0349: public java.sql.Timestamp getDateTime(String column)
0350: throws DataStoreException;
0351:
0352: /**
0353: * This method returns the default table for the datastore
0354: * @param table The default table for this DataStore
0355: */
0356: public String getDefaultTable();
0357:
0358: /**
0359: * This method returns the current number of rows that will be deleted when the datastores update method is called.
0360: * @return int
0361: */
0362: public int getDeletedCount();
0363:
0364: /**
0365: * This method will return whether the distinct flag in the data store is set. The flag indicates that the distinct keyword should be placed at the beginning of a select statement.
0366: */
0367: public boolean getDistinct();
0368:
0369: /**
0370: * This method return a double value from the current row in data store buffer.
0371: * @return The double value.
0372: * @param column The column number in the in the data store buffer.
0373: */
0374: public double getDouble(int column) throws DataStoreException;
0375:
0376: /**
0377: * This method return a double value from the data store buffer.
0378: * @return The double value.
0379: * @param row The row number in the data store buffer.
0380: * @param column The column number in the in the data store buffer.
0381: */
0382: public double getDouble(int row, int column)
0383: throws DataStoreException;
0384:
0385: /**
0386: * This method return a double value from the data store buffer.
0387: * @return The double value.
0388: * @param row The row number in the data store buffer.
0389: * @param column The column name in the form table.column in the data store buffer
0390: */
0391: public double getDouble(int row, String column)
0392: throws DataStoreException;
0393:
0394: /**
0395: * This method return a double value from the current row in data store buffer.
0396: * @return The double value.
0397: * @param column The column name in the form table.column in the data store buffer
0398: */
0399: public double getDouble(String column) throws DataStoreException;
0400:
0401: /**
0402: * This method returns the current number of rows in the DataStores filter buffer.
0403: * @return the number of rows in the filter buffer.
0404: */
0405: public int getFilteredCount();
0406:
0407: /**
0408: * This method return a float value from the current row in the data store buffer.
0409: * @return The long value.
0410: * @param row The row number in the data store buffer.
0411: * @param column The column number in the data store buffer.
0412: */
0413: public float getFloat(int column) throws DataStoreException;
0414:
0415: /**
0416: * This method return a float value from the data store buffer.
0417: * @return The long value.
0418: * @param row The row number in the data store buffer.
0419: * @param column The column number in the data store buffer.
0420: */
0421: public float getFloat(int row, int column)
0422: throws DataStoreException;
0423:
0424: /**
0425: * This method return a float value from the data store buffer.
0426: * @return The long value.
0427: * @param row The row number in the data store buffer.
0428: * @param column The column name in the data store buffer.
0429: */
0430: public float getFloat(int row, String column)
0431: throws DataStoreException;
0432:
0433: /**
0434: * This method return a float value from the current row in the data store buffer.
0435: * @return The long value.
0436: * @param row The row number in the data store buffer.
0437: * @param column The column name in the data store buffer.
0438: */
0439: public float getFloat(String column) throws DataStoreException;
0440:
0441: /**
0442: * This method returns a the format string for a date, time, datetime or numeric type column.
0443: * @param col The column number to get the format for.
0444: * @see DataStore#getFormattedString
0445: * @see DataStore#setFormattedString
0446: */
0447: public String getFormat(int col) throws DataStoreException;
0448:
0449: /**
0450: * This method returns a the format string for a date, time, datetime or numeric type column.
0451: * @param col The column name to get the format for.
0452: * @see DataStore#getFormattedString
0453: * @see DataStore#setFormattedString
0454: */
0455: public String getFormat(String col) throws DataStoreException;
0456:
0457: /**
0458: * This method return a string value from the data store buffer. If the column is numeric, date, time or datetime it will first be formatted into a String based on the pattern specified in the setFormat method.<BR><BR>
0459: * @see DataStore#setFormat
0460: */
0461: public String getFormattedString(int column)
0462: throws DataStoreException;
0463:
0464: /**
0465: * This method return a string value from the data store buffer. If the column is numeric, date, time or datetime it will first be formatted into a String based on the pattern specified in the setFormat method.<BR><BR>
0466: * @see DataStore#setFormat
0467: */
0468: public String getFormattedString(int row, int column)
0469: throws DataStoreException;
0470:
0471: /**
0472: * This method return a string value from the data store buffer. If the column is numeric, date, time or datetime it will first be formatted into a String based on the pattern specified in the setFormat method.<BR><BR>
0473: * @see DataStore#setFormat
0474: */
0475: public String getFormattedString(int row, String column)
0476: throws DataStoreException;
0477:
0478: /**
0479: * This method return a string value from the data store buffer. If the column is numeric, date, time or datetime it will first be formatted into a String based on the pattern specified in the setFormat method.<BR><BR>
0480: * @see DataStore#setFormat
0481: */
0482: public String getFormattedString(String column)
0483: throws DataStoreException;
0484:
0485: /**
0486: * This method returns the column list in the group by clause.
0487: */
0488: public String getGroupBy();
0489:
0490: /**
0491: * This method returns the having clause for the datastore.
0492: */
0493: public String getHaving();
0494:
0495: /**
0496: * This method return a integer value from the current row in the data store buffer.
0497: * @return The integer value.
0498: * @param column The column number in the data store buffer
0499: */
0500: public int getInt(int column) throws DataStoreException;
0501:
0502: /**
0503: * This method return a integer value from the data store buffer.
0504: * @return The integer value.
0505: * @param row The row number in the data store buffer.
0506: * @param column The column number in the data store buffer
0507: */
0508: public int getInt(int row, int column) throws DataStoreException;
0509:
0510: /**
0511: * This method return a integer value from the data store buffer.
0512: * @return The integer value.
0513: * @param row The row number in the data store buffer.
0514: * @param column The column name in the form table.column in the data store buffer
0515: */
0516: public int getInt(int row, String column) throws DataStoreException;
0517:
0518: /**
0519: * This method return a integer value from the current row in data store buffer.
0520: * @return The integer value.
0521: * @param row The row number in the data store buffer.
0522: * @param column The column name in the form table.column in the data store buffer
0523: */
0524: public int getInt(String column) throws DataStoreException;
0525:
0526: /**
0527: * This method returns the number of columns in a particular join.
0528: */
0529: public int getJoinColumnCount(int joinNo);
0530:
0531: /**
0532: * This method returns the number of joins in the datastore.
0533: */
0534: public int getJoinCount();
0535:
0536: /**
0537: * This method returns a column on the left side of the join.
0538: */
0539: public String getJoinLeftColumn(int joinNo, int colNo);
0540:
0541: /**
0542: * This method returns the true if a particular join is outer.
0543: */
0544: public boolean getJoinOuter(int joinNo);
0545:
0546: //fc 06/11/04: Added this method signature to the interface to get join relationship type.
0547: /**
0548: * This method returns the relation type of the join. (RELATION_ONE_TO_ONE, RELATION_ONE_TO_MANY, RELATION_MANY_TO_ONE)
0549: */
0550: public int getJoinRelationType(int joinNo);
0551:
0552: /**
0553: * This method returns a column on the right side of the join.
0554: */
0555: public String getJoinRightColumn(int joinNo, int colNo);
0556:
0557: /**
0558: * This method return a long value from the current row in the data store buffer.
0559: * @return The long value.
0560: * @param column The column number in the data store buffer.
0561: */
0562: public long getLong(int column) throws DataStoreException;
0563:
0564: /**
0565: * This method return a long value from the data store buffer.
0566: * @return The long value.
0567: * @param row The row number in the data store buffer.
0568: * @param column The column number in the data store buffer.
0569: */
0570: public long getLong(int row, int column) throws DataStoreException;
0571:
0572: /**
0573: * This method return a long value from the data store buffer.
0574: * @return The long value.
0575: * @param row The row number in the data store buffer.
0576: * @param column The column name in the data store buffer.
0577: */
0578: public long getLong(int row, String column)
0579: throws DataStoreException;
0580:
0581: /**
0582: * This method return a long value from the data store buffer.
0583: * @return The long value.
0584: * @param row The row number in the data store buffer.
0585: * @param column The column name in the data store buffer.
0586: */
0587: public long getLong(String column) throws DataStoreException;
0588:
0589: /**
0590: * This method will return the maximum number of rows that the datastore will retrieve. If the max is set to -1, the datastore will retrieve all rows in the result set. Otherwise it will stop retrieving when the max is reached.
0591: */
0592: public int getMaxRows();
0593:
0594: /**
0595: * This method returns the order by clause for the datastore.
0596: */
0597: public String getOrderBy();
0598:
0599: /**
0600: * This method creates a properties object containing the definition of the data store.
0601: */
0602: public Properties getProperties();
0603:
0604: /**
0605: * Used to get the remote id for the datastore
0606: */
0607: public String getRemoteID();
0608:
0609: /**
0610: * This method returns the current row in the result set.
0611: * @return The current row in the result set or -1 if the result set is empty.
0612: */
0613: public int getRow();
0614:
0615: /**
0616: * This method returns the current number of rows in the DataStores data buffer. If a retrieve is in progress this value will change as the rows are retrieved.
0617: * @return the number of rows in the buffer.
0618: */
0619: public int getRowCount();
0620:
0621: /**
0622: * This method returns the status flag of the current row.
0623: * @return -1 if the row is not in the buffer or the status if it is (Valid values: STATUS_NOT_MODIFIED, STATUS_MODIFIED, STATUS_NEW, STATUS_NEW_MODIFIED).
0624: */
0625: public int getRowStatus();
0626:
0627: /**
0628: * This method returns the status flag of the specified row.
0629: * @param row The row in the datastore buffer.
0630: * @return -1 if the row is not in the buffer or the status if it is. (Valid values: STATUS_NOT_MODIFIED, STATUS_MODIFIED, STATUS_NEW, STATUS_NEW_MODIFIED).
0631: */
0632: public int getRowStatus(int row);
0633:
0634: /**
0635: * This method return a short value from the current row in the data store buffer.
0636: * @return The short value.
0637: * @param column The column number in the data store buffer.
0638: */
0639: public short getShort(int column) throws DataStoreException;
0640:
0641: /**
0642: * This method return a short value from the data store buffer.
0643: * @return The short value.
0644: * @param row The row number in the data store buffer.
0645: * @param column The column number in the data store buffer.
0646: */
0647: public short getShort(int row, int column)
0648: throws DataStoreException;
0649:
0650: /**
0651: * This method return a short value from the data store buffer.
0652: * @return The short value.
0653: * @param row The row number in the data store buffer.
0654: * @param column The column name in the form table.column in the data store buffer
0655: */
0656: public short getShort(int row, String column)
0657: throws DataStoreException;
0658:
0659: /**
0660: * This method return a short value from the current row in the data store buffer.
0661: * @return The short value.
0662: * @param column The column name in the form table.column in the data store buffer
0663: */
0664: public short getShort(String column) throws DataStoreException;
0665:
0666: /**
0667: * This method return a string value from the data store buffer.
0668: * @return The String Value
0669: * @param row The row number in the data store buffer
0670: * @param column The column number in the data store buffer
0671: */
0672: public String getString(int column) throws DataStoreException;
0673:
0674: /**
0675: * This method return a string value from the data store buffer.
0676: * @return The String Value
0677: * @param row The row number in the data store buffer.
0678: * @param column The column number in the data store buffer.
0679: */
0680: public String getString(int row, int column)
0681: throws DataStoreException;
0682:
0683: /**
0684: * This method return a String value from the data store buffer.
0685: * @return The String value
0686: * @param row The row number in the data store buffer.
0687: * @param column The column name (in the form table.column) in the data store buffer.
0688: */
0689: public String getString(int row, String column)
0690: throws DataStoreException;
0691:
0692: /**
0693: * This method return a string value from the data store buffer.
0694: * @return The String Value
0695: * @param row The row number in the data store buffer.
0696: * @param column The column name (in the form table.column) in the data store buffer.
0697: */
0698: public String getString(String column) throws DataStoreException;
0699:
0700: /**
0701: * This method returns an array of all the tables referenced in the datastore.
0702: * @param updateable True if the table list should only include updateable tables and false if it should include all.
0703: */
0704: public String[] getTableList(boolean updateable);
0705:
0706: /**
0707: * This method return a time value from current row of the data store buffer.
0708: * @return The time Value
0709: * @param column The column number in the data store buffer.
0710: */
0711: public java.sql.Time getTime(int column) throws DataStoreException;
0712:
0713: /**
0714: * This method return a time value from the data store buffer.
0715: * @return The time Value
0716: * @param row The row number in the data store buffer.
0717: * @param column The column number in the data store buffer.
0718: */
0719: public java.sql.Time getTime(int row, int column)
0720: throws DataStoreException;
0721:
0722: /**
0723: * This method return a time value from the data store buffer.
0724: * @return The Time Value
0725: * @param row The row number in the data store buffer.
0726: * @param column The column name in the data store buffer.
0727: */
0728: public java.sql.Time getTime(int row, String column)
0729: throws DataStoreException;
0730:
0731: /**
0732: * This method return a time value from current row of the data store buffer.
0733: * @return The Time Value
0734: * @param column The column name in the data store buffer.
0735: */
0736: public java.sql.Time getTime(String column)
0737: throws DataStoreException;
0738:
0739: /**
0740: * Use this method to get whether the DataStore will trim (remove trailing spaces) from columns retrieved from the database;
0741: */
0742: public boolean getTrimStrings();
0743:
0744: /**
0745: * Gets the update method for the datastore.
0746: * @see DataStore#setUpdateMethod
0747: */
0748: public int getUpdateMethod();
0749:
0750: /**
0751: * This method is used to get whether a column should use bind variables for inserts and updates. Valid values and BIND_TRUE, BIND_FALSE and BIND_DEFAULT (Use default for datastore)
0752: */
0753: public int getUseBindColumn(int col) throws DataStoreException;
0754:
0755: /**
0756: * This method is used to get whether a column should use bind variables for inserts and updates. Valid values and BIND_TRUE, BIND_FALSE and BIND_DEFAULT (Use default for datastore)
0757: */
0758: public int getUseBindColumn(String col) throws DataStoreException;
0759:
0760: /**
0761: * Use this method to get whether or not the datastore will use bind variables as the default for updating or inserting columns.
0762: */
0763: public boolean getUseBindForUpdate();
0764:
0765: /**
0766: * This method makes the current row the first one in the result set.
0767: * @return Returns fals if the result set is empty.
0768: */
0769: public boolean gotoFirst();
0770:
0771: /**
0772: * This method makes the current row the last one in the result set.
0773: * @return Returns fals if the result set is empty.
0774: */
0775: public boolean gotoLast();
0776:
0777: /**
0778: * This method increments the current row in the result set.
0779: * @return Returns false if the result set is empty or the current row is the last.
0780: */
0781: public boolean gotoNext();
0782:
0783: /**
0784: * This method decrements the current row in the result set.
0785: * @return Returns false if the result set is empty or the current row is the first.
0786: */
0787: public boolean gotoPrior();
0788:
0789: /**
0790: * This method makes a specific row the current one in the result set.
0791: * @return Returns false if the result set is empty or the row passed is beyond the bounds of the result set.
0792: * @param row The row in the result set to make current.
0793: */
0794: public boolean gotoRow(int row);
0795:
0796: /**
0797: * Inserts a blank row at the end of the DataStoreBuffer. Returns the number of the row added.
0798: */
0799: public int insertRow();
0800:
0801: /**
0802: * Inserts a blank row at the specified position of the DataStore's result set buffer. Returns the number of the row added.
0803: */
0804: public int insertRow(int atPosition);
0805:
0806: /**
0807: * This method will return true if the passed string value if a valid entry for the column based on the String format specified for the column via the setFormat method.
0808: * @see DataStoreBuffer#setFormat
0809: */
0810: public boolean isFormattedStringValid(int column, String value)
0811: throws DataStoreException;
0812:
0813: /**
0814: * This method will return true if the passed string value if a valid entry for the column based on the String format specified for the column via the setFormat method.
0815: * @see DataStoreBuffer#setFormat
0816: */
0817: public boolean isFormattedStringValid(String column, String value)
0818: throws DataStoreException;
0819:
0820: /**
0821: * This method returns whether a column is part of the primary key
0822: */
0823: public boolean isPrimaryKey(int col) throws DataStoreException;
0824:
0825: /**
0826: * This method returns whether a column is part of the primary key
0827: */
0828: public boolean isPrimaryKey(String col) throws DataStoreException;
0829:
0830: /**
0831: * This method returns whether a column is updateable
0832: */
0833: public boolean isUpdateable(int col) throws DataStoreException;
0834:
0835: /**
0836: * This method returns whether a column is updateable
0837: */
0838: public boolean isUpdateable(String col) throws DataStoreException;
0839:
0840: /**
0841: * This method will ping the server for this particular data store. Pinging from time to time will prevent the server session from expiring.
0842: * @return true if the ping succeeds and false if not.
0843: */
0844: public boolean ping() throws Exception;
0845:
0846: /**
0847: * This removes the current row from the DataStore buffer. This will not generate a delete statment that will remove the row from the database when the update method is called.
0848: * @return True if the row is remove and false if not.
0849: */
0850: public boolean removeRow();
0851:
0852: /**
0853: * This removes the row from the DataStore buffer. This will not generate a delete statment that will remove the row from the database when the update method is called.
0854: * @param row The number of the row to remove.
0855: * @return True if the row is remove and false if not.
0856: */
0857: public boolean removeRow(int row);
0858:
0859: /**
0860: * This method will clear all rows in the dataStore.
0861: */
0862: public void reset();
0863:
0864: /**
0865: * This method will clear the row status flags and clear the deleted buffer in the DataStoreBuffer.
0866: */
0867: public void resetStatus();
0868:
0869: /**
0870: * Executes the sql statement and retrieves to data. The data is retrieved in a new thread so the beginning of the result set can be accessed before all the data has been retrieved.
0871: * You do not need to pass a database connection to this version of retrieve, but in order to use it the DataStore must be created with a constructor that passes an application (not the no args constructor).
0872: */
0873: public void retrieve() throws java.sql.SQLException,
0874: DataStoreException;
0875:
0876: /**
0877: * This method sets a value in the data store's internal buffer.
0878: * @param row The row number for the value to set.
0879: * @param column The column for the value to set.
0880: * @param value The data to place in the column
0881: */
0882: public void setAny(int row, int column, Object value)
0883: throws DataStoreException;
0884:
0885: /**
0886: * This method sets a value in the data store's internal buffer at the current row.
0887: * @param row The row number for the value to set.
0888: * @param column The column for the value to set.
0889: * @param value The data to place in the column.
0890: */
0891: public void setAny(int column, Object value)
0892: throws DataStoreException;
0893:
0894: /**
0895: * This method sets a value in the data store's internal buffer.
0896: * @param row The row number for the value to set.
0897: * @param column The column for the value to set.
0898: * @param value The data to place in the column.
0899: */
0900: public void setAny(int row, String column, Object value)
0901: throws DataStoreException;
0902:
0903: /**
0904: * This method sets a value in the data store's internal buffer at the current row.
0905: * @param row The row number for the value to set.
0906: * @param column The column for the value to set.
0907: * @param value The data to place in the column
0908: */
0909: public void setAny(String column, Object value)
0910: throws DataStoreException;
0911:
0912: /**
0913: * This method sets a value in the data store's internal buffer at the current row.
0914: * @param row The row number for the value to set.
0915: * @param column The column for the value to set.
0916: * @param value The data to place in the column.
0917: */
0918: public void setByteArray(int column, byte[] value)
0919: throws DataStoreException;
0920:
0921: /**
0922: * This method sets a value in the data store's internal buffer.
0923: * @param row The row number for the value to set.
0924: * @param column The column for the value to set.
0925: * @param value The data to place in the column.
0926: */
0927: public void setByteArray(int row, int column, byte[] value)
0928: throws DataStoreException;
0929:
0930: /**
0931: * This method sets a value in the data store's internal buffer.
0932: * @param row The row number for the value to set.
0933: * @param column The column for the value to set.
0934: * @param value The data to place in the column.
0935: */
0936: public void setByteArray(int row, String column, byte[] value)
0937: throws DataStoreException;
0938:
0939: /**
0940: * This method sets a value in the data store's internal buffer at the current row.
0941: * @param row The row number for the value to set.
0942: * @param column The column for the value to set.
0943: * @param value The data to place in the column
0944: */
0945: public void setByteArray(String column, byte[] value)
0946: throws DataStoreException;
0947:
0948: /**
0949: * This method sets the specified row in the DataStore. The DataStoreRow must be compatible with the internal structure of the datastore (eg created with the getDataStoreRow method from the same datastore). To create a blank row in the datastore call the insertRow method and then getDataStoreRow.
0950: * @param rowNo The number of the row to get.
0951: * @param buffer The datastore buffer to look in. Valid values are BUFFER_STANDARD, BUFFER_DELETED, BUFFER_FILTERED.
0952: * @param row The row to set
0953: */
0954: public void setDataStoreRow(int rowNo, int buffer, DataStoreRow row)
0955: throws DataStoreException;
0956:
0957: /**
0958: * This method sets a value in the data store's internal buffer.
0959: * @param row The row number for the value to set.
0960: * @param column The column for the value to set.
0961: * @param value The data to place in the column.
0962: */
0963: public void setDate(int row, int column, java.sql.Date value)
0964: throws DataStoreException;
0965:
0966: /**
0967: * This method sets a value in the data store's internal buffer.
0968: * @param row The row number for the value to set.
0969: * @param column The column for the value to set.
0970: * @param value The data to place in the column.
0971: */
0972: public void setDate(int row, String column, java.sql.Date value)
0973: throws DataStoreException;
0974:
0975: /**
0976: * This method sets a value in the data store's internal buffer at the current row.
0977: * @param row The row number for the value to set.
0978: * @param column The column for the value to set.
0979: * @param value The data to place in the column.
0980: */
0981: public void setDate(int column, java.sql.Date value)
0982: throws DataStoreException;
0983:
0984: /**
0985: * This method sets a value in the data store's internal buffer at the current row.
0986: * @param row The row number for the value to set.
0987: * @param column The column for the value to set.
0988: * @param value The data to place in the column
0989: */
0990: public void setDate(String column, java.sql.Date value)
0991: throws DataStoreException;
0992:
0993: /**
0994: * This method sets a value in the data store's internal buffer.
0995: * @param row The row number for the value to set.
0996: * @param column The column for the value to set.
0997: * @param value The data to place in the column.
0998: */
0999: public void setDateTime(int row, int column,
1000: java.sql.Timestamp value) throws DataStoreException;
1001:
1002: /**
1003: * This method sets a value in the data store's internal buffer.
1004: * @param row The row number for the value to set.
1005: * @param column The column for the value to set.
1006: * @param value The data to place in the column.
1007: */
1008: public void setDateTime(int row, String column,
1009: java.sql.Timestamp value) throws DataStoreException;
1010:
1011: /**
1012: * This method sets a value in the data store's internal buffer at the current row.
1013: * @param row The row number for the value to set.
1014: * @param column The column for the value to set.
1015: * @param value The data to place in the column.
1016: */
1017: public void setDateTime(int column, java.sql.Timestamp value)
1018: throws DataStoreException;
1019:
1020: /**
1021: * This method sets a value in the data store's internal buffer at the current row.
1022: * @param row The row number for the value to set.
1023: * @param column The column for the value to set.
1024: * @param value The data to place in the column
1025: */
1026: public void setDateTime(String column, java.sql.Timestamp value)
1027: throws DataStoreException;
1028:
1029: /**
1030: * This method will set the distinct flag in the data store.
1031: * @param distinct if the flag is set to true the generated select statement will begin with a select distinct.
1032: */
1033: public void setDistinct(boolean distinct);
1034:
1035: /**
1036: * This method sets a value in the data store's internal buffer at the current row.
1037: * @param row The row number for the value to set.
1038: * @param column The column for the value to set.
1039: * @param value The data to place in the column.
1040: */
1041: public void setDouble(int column, double value)
1042: throws DataStoreException;
1043:
1044: /**
1045: * This method sets a value in the data store's internal buffer.
1046: * @param row The row number for the value to set.
1047: * @param column The column for the value to set.
1048: * @param value The data to place in the column.
1049: */
1050: public void setDouble(int row, int column, double value)
1051: throws DataStoreException;
1052:
1053: /**
1054: * This method sets a value in the data store's internal buffer.
1055: * @param row The row number for the value to set.
1056: * @param column The column for the value to set.
1057: * @param value The data to place in the column.
1058: */
1059: public void setDouble(int row, String column, double value)
1060: throws DataStoreException;
1061:
1062: /**
1063: * This method sets a value in the data store's internal buffer at the current row.
1064: * @param row The row number for the value to set.
1065: * @param column The column for the value to set.
1066: * @param value The data to place in the column.
1067: */
1068: public void setDouble(String column, double value)
1069: throws DataStoreException;
1070:
1071: /**
1072: * This method will set the expression used to find rows in the datastore. It is used in conjunction with the findNext, findPrior, findFirst, findLast and find methods.
1073: * @param exp The expression to use in the find.
1074: * @see DataStore#findNext
1075: * @see DataStore#findPrior
1076: * @see DataStore#findFirst
1077: * @see DataStore#findLast
1078: * @see DataStore#find
1079: * @see DataStore#filter
1080: * @see DataStoreEvaluator
1081: */
1082: public void setFindExpression(String exp) throws DataStoreException;
1083:
1084: /**
1085: * This method sets a value in the data store's internal buffer at the current row.
1086: * @param row The row number for the value to set.
1087: * @param column The column for the value to set.
1088: * @param value The data to place in the column.
1089: */
1090: public void setFloat(int column, float value)
1091: throws DataStoreException;
1092:
1093: /**
1094: * This method sets a value in the data store's internal buffer.
1095: * @param row The row number for the value to set.
1096: * @param column The column for the value to set.
1097: * @param value The data to place in the column.
1098: */
1099: public void setFloat(int row, int column, float value)
1100: throws DataStoreException;
1101:
1102: /**
1103: * This method sets a value in the data store's internal buffer.
1104: * @param row The row number for the value to set.
1105: * @param column The column for the value to set.
1106: * @param value The data to place in the column.
1107: */
1108: public void setFloat(int row, String column, float value)
1109: throws DataStoreException;
1110:
1111: /**
1112: * This method sets a value in the data store's internal buffer at the current row.
1113: * @param row The row number for the value to set.
1114: * @param column The column for the value to set.
1115: * @param value The data to place in the column.
1116: */
1117: public void setFloat(String column, float value)
1118: throws DataStoreException;
1119:
1120: /**
1121: * This method sets a the format string for a date, time, datetime or numeric type column.
1122: * @param col The column number to set the format for.
1123: * @param format The format to use in parsing or formatting the value
1124: * @see DataStore#getFormattedString
1125: * @see DataStore#setFormattedString
1126: */
1127: public void setFormat(int col, String format)
1128: throws DataStoreException;
1129:
1130: /**
1131: * This method sets a the format string for a date, time, datetime or numeric type column.<BR><BR>
1132: * Date Formats<BR><BR>
1133: * Symbol Meaning Presentation Example<BR>
1134: * ------ ------- ------------ -------<BR>
1135: * G era designator (Text) AD<BR>
1136: * y year (Number) 1996<BR>
1137: * M month in year (Text & Number) July & 07<BR>
1138: * d day in month (Number) 10<BR>
1139: * h hour in am/pm (1~12) (Number) 12<BR>
1140: * H hour in day (0~23) (Number) 0<BR>
1141: * m minute in hour (Number) 30<BR>
1142: * s second in minute (Number) 55<BR>
1143: * S millisecond (Number) 978<BR>
1144: * E day in week (Text) Tuesday<BR>
1145: * D day in year (Number) 189<BR>
1146: * F day of week in month (Number) 2 (2nd Wed in July)<BR>
1147: * w week in year (Number) 27<BR>
1148: * W week in month (Number) 2<BR>
1149: * a am/pm marker (Text) PM<BR>
1150: * k hour in day (1~24) (Number) 24<BR>
1151: * K hour in am/pm (0~11) (Number) 0<BR>
1152: * z time zone (Text) Pacific Standard Time<BR>
1153: * ' escape for text (Delimiter)<BR>
1154: * '' single quote (Literal) '<BR><BR>
1155: * Numeric Formats<BR><BR>
1156: * Symbol Meaning<BR>
1157: * ------ -------<BR>
1158: * 0 a digit<BR>
1159: * # a digit, zero shows as absent<BR>
1160: * . placeholder for decimal separator<BR>
1161: * , placeholder for grouping separator.<BR>
1162: * ; separates formats.<BR>
1163: * - default negative prefix.<BR>
1164: * % multiply by 100 and show as percentage<BR>
1165: * ? multiply by 1000 and show as per mille<BR>
1166: * ¤ currency sign; replaced by currency symbol; if<BR>
1167: * doubled, replaced by international currency symbol.<BR>
1168: * If present in a pattern, the monetary decimal separator<BR>
1169: * is used instead of the decimal separator.<BR>
1170: * X any other characters can be used in the prefix or suffix<BR>
1171: * ' used to quote special characters in a prefix or suffix.<BR>
1172: * @param col The column name to set the format for.
1173: * @param format The format to use in parsing or formatting the value
1174: * @see DataStore#getFormattedString
1175: * @see DataStore#setFormattedString
1176: */
1177: public void setFormat(String col, String format)
1178: throws DataStoreException;
1179:
1180: /**
1181: * This method will set a parse a string value using the format specified in setFormat for this column and place it in the datastore if it is valid.<BR>
1182: * @see DataStore#setFormat
1183: */
1184: public void setFormattedString(int row, int column, String value)
1185: throws DataStoreException;
1186:
1187: /**
1188: * This method will set a parse a string value using the format specified in setFormat for this column and place it in the datastore if it is valid.<BR>
1189: * @see DataStore#setFormat
1190: */
1191: public void setFormattedString(int column, String value)
1192: throws DataStoreException;
1193:
1194: /**
1195: * This method will set a parse a string value using the format specified in setFormat for this column and place it in the datastore if it is valid.<BR>
1196: * @see DataStore#setFormat
1197: */
1198: public void setFormattedString(int row, String column, String value)
1199: throws DataStoreException;
1200:
1201: /**
1202: * This method will set a parse a string value using the format specified in setFormat for this column and place it in the datastore if it is valid.<BR>
1203: * @see DataStore#setFormat
1204: */
1205: public void setFormattedString(String column, String value)
1206: throws DataStoreException;
1207:
1208: /**
1209: * This method sets a value in the data store's internal buffer.
1210: * @param row The row number for the value to set.
1211: * @param column The column for the value to set.
1212: * @param value The data to place in the column.
1213: */
1214: public void setInt(int row, int column, int value)
1215: throws DataStoreException;
1216:
1217: /**
1218: * This method sets a value in the data store's internal buffer.
1219: * @param row The row number for the value to set.
1220: * @param column The column for the value to set.
1221: * @param value The data to place in the column.
1222: */
1223: public void setInt(int row, String column, int value)
1224: throws DataStoreException;
1225:
1226: /**
1227: * This method sets a value in the data store's internal buffer at the current row.
1228: * @param row The row number for the value to set.
1229: * @param column The column for the value to set.
1230: * @param value The data to place in the column.
1231: */
1232: public void setInt(String column, int value)
1233: throws DataStoreException;
1234:
1235: /**
1236: * This method sets a value in the data store's internal buffer.
1237: * @param row The row number for the value to set.
1238: * @param column The column for the value to set.
1239: * @param value The data to place in the column.
1240: */
1241: public void setLong(int row, int column, long value)
1242: throws DataStoreException;
1243:
1244: /**
1245: * This method sets a value in the data store's internal buffer at the current row.
1246: * @param row The row number for the value to set.
1247: * @param column The column for the value to set.
1248: * @param value The data to place in the column.
1249: */
1250: public void setLong(int column, long value)
1251: throws DataStoreException;
1252:
1253: /**
1254: * This method sets a value in the data store's internal buffer.
1255: * @param row The row number for the value to set.
1256: * @param column The column for the value to set.
1257: * @param value The data to place in the column.
1258: */
1259: public void setLong(int row, String column, long value)
1260: throws DataStoreException;
1261:
1262: /**
1263: * This method sets a value in the data store's internal buffer at the current row.
1264: * @param row The row number for the value to set.
1265: * @param column The column for the value to set.
1266: * @param value The data to place in the column.
1267: */
1268: public void setLong(String column, long value)
1269: throws DataStoreException;
1270:
1271: /**
1272: * Sets the order by clause of the DataStore's SQL Statement
1273: * @param orderBy The columns to use to sort the result set.
1274: */
1275: public void setOrderBy(String orderBy);
1276:
1277: /**
1278: * This method is used to indicate whether a column is part of the primary key
1279: */
1280: public void setPrimaryKey(int col, boolean pkey)
1281: throws DataStoreException;
1282:
1283: /**
1284: * This method is used to indicate whether a column is part of the primary key
1285: */
1286: public void setPrimaryKey(String col, boolean pkey)
1287: throws DataStoreException;
1288:
1289: /**
1290: * This method builds the datastore from the information in the properties object.
1291: */
1292: public void setProperties(Properties p);
1293:
1294: /**
1295: * Used to set the remote id for the datastore
1296: */
1297: public void setRemoteID(String remoteID);
1298:
1299: /**
1300: * This method sets the status flag of the current row.
1301: * @param status (STATUS_NOT_MODIFIED,STATUS_MODIFIED,STATUS_NEW,STATUS_NEW_MODIFIED)
1302: * @return True if the row is in the buffer and false if not
1303: */
1304: public boolean setRowStatus(int status);
1305:
1306: /**
1307: * This method sets the status flag of the specified row.
1308: * @param row The row in the datastore buffer.
1309: * @param status (STATUS_NOT_MODIFIED,STATUS_MODIFIED,STATUS_NEW,STATUS_NEW_MODIFIED)
1310: * @return True if the row is in the buffer and false if not
1311: */
1312: public boolean setRowStatus(int row, int status);
1313:
1314: /**
1315: * This method sets a value in the data store's internal buffer.
1316: * @param row The row number for the value to set.
1317: * @param column The column for the value to set.
1318: * @param value The data to place in the column.
1319: */
1320: public void setShort(int row, int column, short value)
1321: throws DataStoreException;
1322:
1323: /**
1324: * This method sets a value in the data store's internal buffer.
1325: * @param row The row number for the value to set.
1326: * @param column The column for the value to set.
1327: * @param value The data to place in the column.
1328: */
1329: public void setShort(int row, String column, short value)
1330: throws DataStoreException;
1331:
1332: /**
1333: * This method sets a value in the data store's internal buffer at the current row.
1334: * @param row The row number for the value to set.
1335: * @param column The column for the value to set.
1336: * @param value The data to place in the column.
1337: */
1338: public void setShort(int column, short value)
1339: throws DataStoreException;
1340:
1341: /**
1342: * This method sets a value in the data store's internal buffer at the current row.
1343: * @param row The row number for the value to set.
1344: * @param column The column for the value to set.
1345: * @param value The data to place in the column.
1346: */
1347: public void setShort(String column, short value)
1348: throws DataStoreException;
1349:
1350: /**
1351: * This method sets a value in the data store's internal buffer.
1352: * @param row The row number for the value to set.
1353: * @param column The column for the value to set.
1354: * @param value The data to place in the column.
1355: */
1356: public void setString(int row, int column, String value)
1357: throws DataStoreException;
1358:
1359: /**
1360: * This method sets a value in the data store's internal buffer at the current row.
1361: * @param row The row number for the value to set.
1362: * @param column The column for the value to set.
1363: * @param value The data to place in the column.
1364: */
1365: public void setString(int column, String value)
1366: throws DataStoreException;
1367:
1368: /**
1369: * This method sets a value in the data store's internal buffer.
1370: * @param row The row number for the value to set.
1371: * @param column The column for the value to set.
1372: * @param value The data to place in the column.
1373: */
1374: public void setString(int row, String column, String value)
1375: throws DataStoreException;
1376:
1377: /**
1378: * This method sets a value in the data store's internal buffer at the current row.
1379: * @param row The row number for the value to set.
1380: * @param column The column for the value to set.
1381: * @param value The data to place in the column
1382: */
1383: public void setString(String column, String value)
1384: throws DataStoreException;
1385:
1386: /**
1387: * This method sets a value in the data store's internal buffer.
1388: * @param row The row number for the value to set.
1389: * @param column The column for the value to set.
1390: * @param value The data to place in the column.
1391: */
1392: public void setTime(int row, int column, java.sql.Time value)
1393: throws DataStoreException;
1394:
1395: /**
1396: * This method sets a value in the data store's internal buffer.
1397: * @param row The row number for the value to set.
1398: * @param column The column for the value to set.
1399: * @param value The data to place in the column.
1400: */
1401: public void setTime(int row, String column, java.sql.Time value)
1402: throws DataStoreException;
1403:
1404: /**
1405: * This method sets a value in the data store's internal buffer at the current row.
1406: * @param row The row number for the value to set.
1407: * @param column The column for the value to set.
1408: * @param value The data to place in the column.
1409: */
1410: public void setTime(int column, java.sql.Time value)
1411: throws DataStoreException;
1412:
1413: /**
1414: * This method sets a value in the data store's internal buffer at the current row.
1415: * @param row The row number for the value to set.
1416: * @param column The column for the value to set.
1417: * @param value The data to place in the column
1418: */
1419: public void setTime(String column, java.sql.Time value)
1420: throws DataStoreException;
1421:
1422: /**
1423: * This method will sort the rows in the data store on an array of columns.
1424: * @param col[] A array of column numbers to sort on.
1425: * @param dir[] An integer array of the direction to sort on. Each element can contain either SORT_ASC or SORT_DESC.
1426: */
1427: public void sort(int[] col, int dir[]) throws DataStoreException;
1428:
1429: /**
1430: * This method will sort the rows in the data store on an array of columns.
1431: * @param obj[] A array of objects to sort on. The array can contain Strings (column name), Integers (column numbers) or DataStoreEvaluators (expressions)
1432: * @param dir[] An integer array of the direction to sort on. Each element can contain either SORT_ASC or SORT_DESC.
1433: */
1434: public void sort(Object[] obj, int dir[]) throws DataStoreException;
1435:
1436: /**
1437: * This method will sort the rows in the data store on an array of columns.
1438: * @param col[] A String array of column names to sort on.
1439: * @param dir[] An integer array of the direction to sort on. Each element can contain either SORT_ASC or SORT_DESC.
1440: */
1441: public void sort(String col[], int dir[]) throws DataStoreException;
1442:
1443: /**
1444: * This method will sort the rows in the data store on a particular column.
1445: * @param col The column number of the column to sort on.
1446: * @param dir The direction to sort on. Either SORT_ASC or SORT_DESC.
1447: */
1448: public void sort(int col, int dir) throws DataStoreException;
1449:
1450: /**
1451: * This method will sort the rows in the data store using an expression.
1452: * @param eval A datastore evaluator containing the expression.
1453: * @param dir An integer indicating the sort direction valid values are SORT_ASC or SORT_DESC.
1454: */
1455: public void sort(DataStoreEvaluator eval, int dir)
1456: throws DataStoreException;
1457:
1458: /**
1459: * This method will sort the rows in the data store on a particular column.
1460: * @param col The name of the column to sort on.
1461: * @param dir The direction to sort on. Either SORT_ASC or SORT_DESC.
1462: */
1463: public void sort(String col, int dir) throws DataStoreException;
1464:
1465: /**
1466: * This method will take a row from the datastores deleted buffer and move it back to the standard buffer.
1467: * @param row The number of the row to undelete. Note: this is the row number of the row in the deleted buffer not the standard buffer.
1468: * @return The number that the deleted row was moved to in the standard buffer or -1 if an error occurs.
1469: */
1470: public int unDeleteRow(int row);
1471:
1472: /**
1473: * This method will cause the database to reflect the changes made in the data store's buffer.
1474: * @exception com.salmonllc.sql.DataStoreException If a SQLError occurs while the datastore is updating.
1475: */
1476: public void update() throws DataStoreException,
1477: java.sql.SQLException;
1478:
1479: /**
1480: * This method will block until a datastore cancel command is finished
1481: */
1482: public void waitForCancel();
1483:
1484: /**
1485: * This method will block until all the data from the last retrieve method call has been loaded into the DataStore's internal buffer.
1486: */
1487: public void waitForRetrieve();
1488:
1489: }
|