0001: /*
0002: * Copyright (C) 2006 Rob Manning
0003: * manningr@users.sourceforge.net
0004: *
0005: * This library is free software; you can redistribute it and/or
0006: * modify it under the terms of the GNU Lesser General Public
0007: * License as published by the Free Software Foundation; either
0008: * version 2.1 of the License, or (at your option) any later version.
0009: *
0010: * This library is distributed in the hope that it will be useful,
0011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0013: * Lesser General Public License for more details.
0014: *
0015: * You should have received a copy of the GNU Lesser General Public
0016: * License along with this library; if not, write to the Free Software
0017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0018: */
0019: package net.sourceforge.squirrel_sql.mo.sql;
0020:
0021: import java.sql.ResultSet;
0022: import java.sql.SQLException;
0023:
0024: import net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData;
0025: import net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo;
0026:
0027: import com.mockobjects.sql.MockSingleRowResultSet;
0028:
0029: @SuppressWarnings("unused")
0030: public class MockDatabaseMetaData extends
0031: com.mockobjects.sql.MockDatabaseMetaData {
0032:
0033: private MockResultSet catalogs = null;
0034: private MockResultSet schemas = null;
0035: private String keywords = null;
0036: private MockResultSet typeInfo = null;
0037: private MockResultSet procedures = null;
0038:
0039: private String catalog = "aCatalog";
0040: private String schema = "aSchema";
0041:
0042: private String catalogTerm = "CATALOG";
0043: private String schemaTerm = "SCHEMA";
0044: private String procedureTerm = "PROCEDURE";
0045:
0046: public MockDatabaseMetaData() {
0047:
0048: }
0049:
0050: public MockDatabaseMetaData(String currentCatalog,
0051: String currentSchema) {
0052: catalog = currentCatalog;
0053: schema = currentSchema;
0054: }
0055:
0056: /* (non-Javadoc)
0057: * @see com.mockobjects.sql.MockDatabaseMetaData#getIdentifierQuoteString()
0058: */
0059: public String getIdentifierQuoteString() throws SQLException {
0060: // TODO Auto-generated method stub
0061: return "\"";
0062: }
0063:
0064: /* (non-Javadoc)
0065: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSchemasInDataManipulation()
0066: */
0067: public boolean supportsSchemasInDataManipulation()
0068: throws SQLException {
0069: return false;
0070: }
0071:
0072: /* (non-Javadoc)
0073: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCatalogsInDataManipulation()
0074: */
0075: public boolean supportsCatalogsInDataManipulation()
0076: throws SQLException {
0077: return false;
0078: }
0079:
0080: /* (non-Javadoc)
0081: * @see com.mockobjects.sql.MockDatabaseMetaData#getTableTypes()
0082: */
0083: public ResultSet getTableTypes() throws SQLException {
0084: MockSingleRowResultSet rs = new MockSingleRowResultSet();
0085: rs.addExpectedIndexedValues(new Object[] { "TABLE" });
0086: return rs;
0087: }
0088:
0089: /* (non-Javadoc)
0090: * @see com.mockobjects.sql.MockDatabaseMetaData#getDatabaseProductName()
0091: */
0092: public String getDatabaseProductName() throws SQLException {
0093: return "junitDBProductName";
0094: }
0095:
0096: /* (non-Javadoc)
0097: * @see com.mockobjects.sql.MockDatabaseMetaData#getDatabaseProductName()
0098: */
0099: public String getDatabaseProductVersion() throws SQLException {
0100: return "1.0";
0101: }
0102:
0103: /* (non-Javadoc)
0104: * @see com.mockobjects.sql.MockDatabaseMetaData#allProceduresAreCallable()
0105: */
0106: public boolean allProceduresAreCallable() throws SQLException {
0107: // TODO Auto-generated method stub
0108: return false;
0109: }
0110:
0111: /* (non-Javadoc)
0112: * @see com.mockobjects.sql.MockDatabaseMetaData#allTablesAreSelectable()
0113: */
0114: public boolean allTablesAreSelectable() throws SQLException {
0115: // TODO Auto-generated method stub
0116: return false;
0117: }
0118:
0119: /* (non-Javadoc)
0120: * @see com.mockobjects.sql.MockDatabaseMetaData#deletesAreDetected(int)
0121: */
0122: public boolean deletesAreDetected(int arg0) throws SQLException {
0123: // TODO Auto-generated method stub
0124: return false;
0125: }
0126:
0127: /* (non-Javadoc)
0128: * @see com.mockobjects.sql.MockDatabaseMetaData#doesMaxRowSizeIncludeBlobs()
0129: */
0130: public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
0131: // TODO Auto-generated method stub
0132: return false;
0133: }
0134:
0135: /* (non-Javadoc)
0136: * @see com.mockobjects.sql.MockDatabaseMetaData#insertsAreDetected(int)
0137: */
0138: public boolean insertsAreDetected(int arg0) throws SQLException {
0139: // TODO Auto-generated method stub
0140: return false;
0141: }
0142:
0143: /* (non-Javadoc)
0144: * @see com.mockobjects.sql.MockDatabaseMetaData#isCatalogAtStart()
0145: */
0146: public boolean isCatalogAtStart() throws SQLException {
0147: // TODO Auto-generated method stub
0148: return false;
0149: }
0150:
0151: /* (non-Javadoc)
0152: * @see com.mockobjects.sql.MockDatabaseMetaData#isReadOnly()
0153: */
0154: public boolean isReadOnly() throws SQLException {
0155: // TODO Auto-generated method stub
0156: return false;
0157: }
0158:
0159: /* (non-Javadoc)
0160: * @see com.mockobjects.sql.MockDatabaseMetaData#locatorsUpdateCopy()
0161: */
0162: public boolean locatorsUpdateCopy() throws SQLException {
0163: // TODO Auto-generated method stub
0164: return false;
0165: }
0166:
0167: /* (non-Javadoc)
0168: * @see com.mockobjects.sql.MockDatabaseMetaData#nullPlusNonNullIsNull()
0169: */
0170: public boolean nullPlusNonNullIsNull() throws SQLException {
0171: // TODO Auto-generated method stub
0172: return false;
0173: }
0174:
0175: /* (non-Javadoc)
0176: * @see com.mockobjects.sql.MockDatabaseMetaData#nullsAreSortedAtEnd()
0177: */
0178: public boolean nullsAreSortedAtEnd() throws SQLException {
0179: // TODO Auto-generated method stub
0180: return false;
0181: }
0182:
0183: /* (non-Javadoc)
0184: * @see com.mockobjects.sql.MockDatabaseMetaData#nullsAreSortedAtStart()
0185: */
0186: public boolean nullsAreSortedAtStart() throws SQLException {
0187: // TODO Auto-generated method stub
0188: return false;
0189: }
0190:
0191: /* (non-Javadoc)
0192: * @see com.mockobjects.sql.MockDatabaseMetaData#nullsAreSortedHigh()
0193: */
0194: public boolean nullsAreSortedHigh() throws SQLException {
0195: // TODO Auto-generated method stub
0196: return false;
0197: }
0198:
0199: /* (non-Javadoc)
0200: * @see com.mockobjects.sql.MockDatabaseMetaData#nullsAreSortedLow()
0201: */
0202: public boolean nullsAreSortedLow() throws SQLException {
0203: // TODO Auto-generated method stub
0204: return false;
0205: }
0206:
0207: /* (non-Javadoc)
0208: * @see com.mockobjects.sql.MockDatabaseMetaData#othersDeletesAreVisible(int)
0209: */
0210: public boolean othersDeletesAreVisible(int arg0)
0211: throws SQLException {
0212: // TODO Auto-generated method stub
0213: return false;
0214: }
0215:
0216: /* (non-Javadoc)
0217: * @see com.mockobjects.sql.MockDatabaseMetaData#othersInsertsAreVisible(int)
0218: */
0219: public boolean othersInsertsAreVisible(int arg0)
0220: throws SQLException {
0221: // TODO Auto-generated method stub
0222: return false;
0223: }
0224:
0225: /* (non-Javadoc)
0226: * @see com.mockobjects.sql.MockDatabaseMetaData#othersUpdatesAreVisible(int)
0227: */
0228: public boolean othersUpdatesAreVisible(int arg0)
0229: throws SQLException {
0230: // TODO Auto-generated method stub
0231: return false;
0232: }
0233:
0234: /* (non-Javadoc)
0235: * @see com.mockobjects.sql.MockDatabaseMetaData#ownDeletesAreVisible(int)
0236: */
0237: public boolean ownDeletesAreVisible(int arg0) throws SQLException {
0238: // TODO Auto-generated method stub
0239: return false;
0240: }
0241:
0242: /* (non-Javadoc)
0243: * @see com.mockobjects.sql.MockDatabaseMetaData#ownInsertsAreVisible(int)
0244: */
0245: public boolean ownInsertsAreVisible(int arg0) throws SQLException {
0246: // TODO Auto-generated method stub
0247: return false;
0248: }
0249:
0250: /* (non-Javadoc)
0251: * @see com.mockobjects.sql.MockDatabaseMetaData#ownUpdatesAreVisible(int)
0252: */
0253: public boolean ownUpdatesAreVisible(int arg0) throws SQLException {
0254: // TODO Auto-generated method stub
0255: return false;
0256: }
0257:
0258: /* (non-Javadoc)
0259: * @see com.mockobjects.sql.MockDatabaseMetaData#setupDriverName(java.lang.String)
0260: */
0261: public void setupDriverName(String arg0) {
0262: // TODO Auto-generated method stub
0263: super .setupDriverName(arg0);
0264: }
0265:
0266: /* (non-Javadoc)
0267: * @see com.mockobjects.sql.MockDatabaseMetaData#storesLowerCaseIdentifiers()
0268: */
0269: public boolean storesLowerCaseIdentifiers() throws SQLException {
0270: // TODO Auto-generated method stub
0271: return false;
0272: }
0273:
0274: /* (non-Javadoc)
0275: * @see com.mockobjects.sql.MockDatabaseMetaData#storesLowerCaseQuotedIdentifiers()
0276: */
0277: public boolean storesLowerCaseQuotedIdentifiers()
0278: throws SQLException {
0279: // TODO Auto-generated method stub
0280: return false;
0281: }
0282:
0283: /* (non-Javadoc)
0284: * @see com.mockobjects.sql.MockDatabaseMetaData#storesMixedCaseIdentifiers()
0285: */
0286: public boolean storesMixedCaseIdentifiers() throws SQLException {
0287: // TODO Auto-generated method stub
0288: return false;
0289: }
0290:
0291: /* (non-Javadoc)
0292: * @see com.mockobjects.sql.MockDatabaseMetaData#storesMixedCaseQuotedIdentifiers()
0293: */
0294: public boolean storesMixedCaseQuotedIdentifiers()
0295: throws SQLException {
0296: // TODO Auto-generated method stub
0297: return false;
0298: }
0299:
0300: /* (non-Javadoc)
0301: * @see com.mockobjects.sql.MockDatabaseMetaData#storesUpperCaseIdentifiers()
0302: */
0303: public boolean storesUpperCaseIdentifiers() throws SQLException {
0304: // TODO Auto-generated method stub
0305: return false;
0306: }
0307:
0308: /* (non-Javadoc)
0309: * @see com.mockobjects.sql.MockDatabaseMetaData#storesUpperCaseQuotedIdentifiers()
0310: */
0311: public boolean storesUpperCaseQuotedIdentifiers()
0312: throws SQLException {
0313: // TODO Auto-generated method stub
0314: return false;
0315: }
0316:
0317: /* (non-Javadoc)
0318: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsAlterTableWithAddColumn()
0319: */
0320: public boolean supportsAlterTableWithAddColumn()
0321: throws SQLException {
0322: // TODO Auto-generated method stub
0323: return false;
0324: }
0325:
0326: /* (non-Javadoc)
0327: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsAlterTableWithDropColumn()
0328: */
0329: public boolean supportsAlterTableWithDropColumn()
0330: throws SQLException {
0331: // TODO Auto-generated method stub
0332: return false;
0333: }
0334:
0335: /* (non-Javadoc)
0336: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsANSI92EntryLevelSQL()
0337: */
0338: public boolean supportsANSI92EntryLevelSQL() throws SQLException {
0339: // TODO Auto-generated method stub
0340: return false;
0341: }
0342:
0343: /* (non-Javadoc)
0344: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsANSI92FullSQL()
0345: */
0346: public boolean supportsANSI92FullSQL() throws SQLException {
0347: // TODO Auto-generated method stub
0348: return false;
0349: }
0350:
0351: /* (non-Javadoc)
0352: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsANSI92IntermediateSQL()
0353: */
0354: public boolean supportsANSI92IntermediateSQL() throws SQLException {
0355: // TODO Auto-generated method stub
0356: return false;
0357: }
0358:
0359: /* (non-Javadoc)
0360: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsBatchUpdates()
0361: */
0362: public boolean supportsBatchUpdates() throws SQLException {
0363: // TODO Auto-generated method stub
0364: return false;
0365: }
0366:
0367: /* (non-Javadoc)
0368: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCatalogsInIndexDefinitions()
0369: */
0370: public boolean supportsCatalogsInIndexDefinitions()
0371: throws SQLException {
0372: // TODO Auto-generated method stub
0373: return false;
0374: }
0375:
0376: /* (non-Javadoc)
0377: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCatalogsInPrivilegeDefinitions()
0378: */
0379: public boolean supportsCatalogsInPrivilegeDefinitions()
0380: throws SQLException {
0381: // TODO Auto-generated method stub
0382: return false;
0383: }
0384:
0385: /* (non-Javadoc)
0386: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCatalogsInProcedureCalls()
0387: */
0388: public boolean supportsCatalogsInProcedureCalls()
0389: throws SQLException {
0390: // TODO Auto-generated method stub
0391: return false;
0392: }
0393:
0394: /* (non-Javadoc)
0395: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCatalogsInTableDefinitions()
0396: */
0397: public boolean supportsCatalogsInTableDefinitions()
0398: throws SQLException {
0399: // TODO Auto-generated method stub
0400: return false;
0401: }
0402:
0403: /* (non-Javadoc)
0404: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsColumnAliasing()
0405: */
0406: public boolean supportsColumnAliasing() throws SQLException {
0407: // TODO Auto-generated method stub
0408: return false;
0409: }
0410:
0411: /* (non-Javadoc)
0412: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsConvert()
0413: */
0414: public boolean supportsConvert() throws SQLException {
0415: // TODO Auto-generated method stub
0416: return false;
0417: }
0418:
0419: /* (non-Javadoc)
0420: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsConvert(int, int)
0421: */
0422: public boolean supportsConvert(int arg0, int arg1)
0423: throws SQLException {
0424: // TODO Auto-generated method stub
0425: return false;
0426: }
0427:
0428: /* (non-Javadoc)
0429: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCoreSQLGrammar()
0430: */
0431: public boolean supportsCoreSQLGrammar() throws SQLException {
0432: // TODO Auto-generated method stub
0433: return false;
0434: }
0435:
0436: /* (non-Javadoc)
0437: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsCorrelatedSubqueries()
0438: */
0439: public boolean supportsCorrelatedSubqueries() throws SQLException {
0440: // TODO Auto-generated method stub
0441: return false;
0442: }
0443:
0444: /* (non-Javadoc)
0445: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsDataDefinitionAndDataManipulationTransactions()
0446: */
0447: public boolean supportsDataDefinitionAndDataManipulationTransactions()
0448: throws SQLException {
0449: // TODO Auto-generated method stub
0450: return false;
0451: }
0452:
0453: /* (non-Javadoc)
0454: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsDataManipulationTransactionsOnly()
0455: */
0456: public boolean supportsDataManipulationTransactionsOnly()
0457: throws SQLException {
0458: // TODO Auto-generated method stub
0459: return false;
0460: }
0461:
0462: /* (non-Javadoc)
0463: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsDifferentTableCorrelationNames()
0464: */
0465: public boolean supportsDifferentTableCorrelationNames()
0466: throws SQLException {
0467: // TODO Auto-generated method stub
0468: return false;
0469: }
0470:
0471: /* (non-Javadoc)
0472: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsExpressionsInOrderBy()
0473: */
0474: public boolean supportsExpressionsInOrderBy() throws SQLException {
0475: // TODO Auto-generated method stub
0476: return false;
0477: }
0478:
0479: /* (non-Javadoc)
0480: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsExtendedSQLGrammar()
0481: */
0482: public boolean supportsExtendedSQLGrammar() throws SQLException {
0483: // TODO Auto-generated method stub
0484: return false;
0485: }
0486:
0487: /* (non-Javadoc)
0488: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsFullOuterJoins()
0489: */
0490: public boolean supportsFullOuterJoins() throws SQLException {
0491: // TODO Auto-generated method stub
0492: return false;
0493: }
0494:
0495: /* (non-Javadoc)
0496: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsGetGeneratedKeys()
0497: */
0498: public boolean supportsGetGeneratedKeys() throws SQLException {
0499: // TODO Auto-generated method stub
0500: return false;
0501: }
0502:
0503: /* (non-Javadoc)
0504: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsGroupBy()
0505: */
0506: public boolean supportsGroupBy() throws SQLException {
0507: // TODO Auto-generated method stub
0508: return false;
0509: }
0510:
0511: /* (non-Javadoc)
0512: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsGroupByBeyondSelect()
0513: */
0514: public boolean supportsGroupByBeyondSelect() throws SQLException {
0515: // TODO Auto-generated method stub
0516: return false;
0517: }
0518:
0519: /* (non-Javadoc)
0520: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsGroupByUnrelated()
0521: */
0522: public boolean supportsGroupByUnrelated() throws SQLException {
0523: // TODO Auto-generated method stub
0524: return false;
0525: }
0526:
0527: /* (non-Javadoc)
0528: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsIntegrityEnhancementFacility()
0529: */
0530: public boolean supportsIntegrityEnhancementFacility()
0531: throws SQLException {
0532: // TODO Auto-generated method stub
0533: return false;
0534: }
0535:
0536: /* (non-Javadoc)
0537: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsLikeEscapeClause()
0538: */
0539: public boolean supportsLikeEscapeClause() throws SQLException {
0540: // TODO Auto-generated method stub
0541: return false;
0542: }
0543:
0544: /* (non-Javadoc)
0545: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsLimitedOuterJoins()
0546: */
0547: public boolean supportsLimitedOuterJoins() throws SQLException {
0548: // TODO Auto-generated method stub
0549: return false;
0550: }
0551:
0552: /* (non-Javadoc)
0553: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsMinimumSQLGrammar()
0554: */
0555: public boolean supportsMinimumSQLGrammar() throws SQLException {
0556: // TODO Auto-generated method stub
0557: return false;
0558: }
0559:
0560: /* (non-Javadoc)
0561: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsMixedCaseIdentifiers()
0562: */
0563: public boolean supportsMixedCaseIdentifiers() throws SQLException {
0564: // TODO Auto-generated method stub
0565: return false;
0566: }
0567:
0568: /* (non-Javadoc)
0569: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsMixedCaseQuotedIdentifiers()
0570: */
0571: public boolean supportsMixedCaseQuotedIdentifiers()
0572: throws SQLException {
0573: // TODO Auto-generated method stub
0574: return false;
0575: }
0576:
0577: /* (non-Javadoc)
0578: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsMultipleOpenResults()
0579: */
0580: public boolean supportsMultipleOpenResults() throws SQLException {
0581: // TODO Auto-generated method stub
0582: return false;
0583: }
0584:
0585: /* (non-Javadoc)
0586: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsMultipleResultSets()
0587: */
0588: public boolean supportsMultipleResultSets() throws SQLException {
0589: // TODO Auto-generated method stub
0590: return false;
0591: }
0592:
0593: /* (non-Javadoc)
0594: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsMultipleTransactions()
0595: */
0596: public boolean supportsMultipleTransactions() throws SQLException {
0597: // TODO Auto-generated method stub
0598: return false;
0599: }
0600:
0601: /* (non-Javadoc)
0602: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsNamedParameters()
0603: */
0604: public boolean supportsNamedParameters() throws SQLException {
0605: // TODO Auto-generated method stub
0606: return false;
0607: }
0608:
0609: /* (non-Javadoc)
0610: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsNonNullableColumns()
0611: */
0612: public boolean supportsNonNullableColumns() throws SQLException {
0613: // TODO Auto-generated method stub
0614: return false;
0615: }
0616:
0617: /* (non-Javadoc)
0618: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsOpenCursorsAcrossCommit()
0619: */
0620: public boolean supportsOpenCursorsAcrossCommit()
0621: throws SQLException {
0622: // TODO Auto-generated method stub
0623: return false;
0624: }
0625:
0626: /* (non-Javadoc)
0627: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsOpenCursorsAcrossRollback()
0628: */
0629: public boolean supportsOpenCursorsAcrossRollback()
0630: throws SQLException {
0631: // TODO Auto-generated method stub
0632: return false;
0633: }
0634:
0635: /* (non-Javadoc)
0636: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsOpenStatementsAcrossCommit()
0637: */
0638: public boolean supportsOpenStatementsAcrossCommit()
0639: throws SQLException {
0640: // TODO Auto-generated method stub
0641: return false;
0642: }
0643:
0644: /* (non-Javadoc)
0645: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsOpenStatementsAcrossRollback()
0646: */
0647: public boolean supportsOpenStatementsAcrossRollback()
0648: throws SQLException {
0649: // TODO Auto-generated method stub
0650: return false;
0651: }
0652:
0653: /* (non-Javadoc)
0654: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsOrderByUnrelated()
0655: */
0656: public boolean supportsOrderByUnrelated() throws SQLException {
0657: // TODO Auto-generated method stub
0658: return false;
0659: }
0660:
0661: /* (non-Javadoc)
0662: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsOuterJoins()
0663: */
0664: public boolean supportsOuterJoins() throws SQLException {
0665: // TODO Auto-generated method stub
0666: return false;
0667: }
0668:
0669: /* (non-Javadoc)
0670: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsPositionedDelete()
0671: */
0672: public boolean supportsPositionedDelete() throws SQLException {
0673: // TODO Auto-generated method stub
0674: return false;
0675: }
0676:
0677: /* (non-Javadoc)
0678: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsPositionedUpdate()
0679: */
0680: public boolean supportsPositionedUpdate() throws SQLException {
0681: // TODO Auto-generated method stub
0682: return false;
0683: }
0684:
0685: /* (non-Javadoc)
0686: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsResultSetConcurrency(int, int)
0687: */
0688: public boolean supportsResultSetConcurrency(int arg0, int arg1)
0689: throws SQLException {
0690: // TODO Auto-generated method stub
0691: return false;
0692: }
0693:
0694: /* (non-Javadoc)
0695: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsResultSetHoldability(int)
0696: */
0697: public boolean supportsResultSetHoldability(int arg0)
0698: throws SQLException {
0699: // TODO Auto-generated method stub
0700: return false;
0701: }
0702:
0703: /* (non-Javadoc)
0704: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsResultSetType(int)
0705: */
0706: public boolean supportsResultSetType(int arg0) throws SQLException {
0707: // TODO Auto-generated method stub
0708: return false;
0709: }
0710:
0711: /* (non-Javadoc)
0712: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSavepoints()
0713: */
0714: public boolean supportsSavepoints() throws SQLException {
0715: // TODO Auto-generated method stub
0716: return false;
0717: }
0718:
0719: /* (non-Javadoc)
0720: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSchemasInIndexDefinitions()
0721: */
0722: public boolean supportsSchemasInIndexDefinitions()
0723: throws SQLException {
0724: // TODO Auto-generated method stub
0725: return false;
0726: }
0727:
0728: /* (non-Javadoc)
0729: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSchemasInPrivilegeDefinitions()
0730: */
0731: public boolean supportsSchemasInPrivilegeDefinitions()
0732: throws SQLException {
0733: // TODO Auto-generated method stub
0734: return false;
0735: }
0736:
0737: /* (non-Javadoc)
0738: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSchemasInProcedureCalls()
0739: */
0740: public boolean supportsSchemasInProcedureCalls()
0741: throws SQLException {
0742: // TODO Auto-generated method stub
0743: return false;
0744: }
0745:
0746: /* (non-Javadoc)
0747: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSchemasInTableDefinitions()
0748: */
0749: public boolean supportsSchemasInTableDefinitions()
0750: throws SQLException {
0751: // TODO Auto-generated method stub
0752: return false;
0753: }
0754:
0755: /* (non-Javadoc)
0756: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSelectForUpdate()
0757: */
0758: public boolean supportsSelectForUpdate() throws SQLException {
0759: // TODO Auto-generated method stub
0760: return false;
0761: }
0762:
0763: /* (non-Javadoc)
0764: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsStatementPooling()
0765: */
0766: public boolean supportsStatementPooling() throws SQLException {
0767: // TODO Auto-generated method stub
0768: return false;
0769: }
0770:
0771: /* (non-Javadoc)
0772: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsStoredProcedures()
0773: */
0774: public boolean supportsStoredProcedures() throws SQLException {
0775: // TODO Auto-generated method stub
0776: return false;
0777: }
0778:
0779: /* (non-Javadoc)
0780: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSubqueriesInComparisons()
0781: */
0782: public boolean supportsSubqueriesInComparisons()
0783: throws SQLException {
0784: // TODO Auto-generated method stub
0785: return false;
0786: }
0787:
0788: /* (non-Javadoc)
0789: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSubqueriesInExists()
0790: */
0791: public boolean supportsSubqueriesInExists() throws SQLException {
0792: // TODO Auto-generated method stub
0793: return false;
0794: }
0795:
0796: /* (non-Javadoc)
0797: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSubqueriesInIns()
0798: */
0799: public boolean supportsSubqueriesInIns() throws SQLException {
0800: // TODO Auto-generated method stub
0801: return false;
0802: }
0803:
0804: /* (non-Javadoc)
0805: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsSubqueriesInQuantifieds()
0806: */
0807: public boolean supportsSubqueriesInQuantifieds()
0808: throws SQLException {
0809: // TODO Auto-generated method stub
0810: return false;
0811: }
0812:
0813: /* (non-Javadoc)
0814: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsTableCorrelationNames()
0815: */
0816: public boolean supportsTableCorrelationNames() throws SQLException {
0817: // TODO Auto-generated method stub
0818: return false;
0819: }
0820:
0821: /* (non-Javadoc)
0822: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsTransactionIsolationLevel(int)
0823: */
0824: public boolean supportsTransactionIsolationLevel(int arg0)
0825: throws SQLException {
0826: // TODO Auto-generated method stub
0827: return false;
0828: }
0829:
0830: /* (non-Javadoc)
0831: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsTransactions()
0832: */
0833: public boolean supportsTransactions() throws SQLException {
0834: // TODO Auto-generated method stub
0835: return false;
0836: }
0837:
0838: /* (non-Javadoc)
0839: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsUnion()
0840: */
0841: public boolean supportsUnion() throws SQLException {
0842: // TODO Auto-generated method stub
0843: return false;
0844: }
0845:
0846: /* (non-Javadoc)
0847: * @see com.mockobjects.sql.MockDatabaseMetaData#supportsUnionAll()
0848: */
0849: public boolean supportsUnionAll() throws SQLException {
0850: // TODO Auto-generated method stub
0851: return false;
0852: }
0853:
0854: /* (non-Javadoc)
0855: * @see com.mockobjects.sql.MockDatabaseMetaData#updatesAreDetected(int)
0856: */
0857: public boolean updatesAreDetected(int arg0) throws SQLException {
0858: // TODO Auto-generated method stub
0859: return false;
0860: }
0861:
0862: /* (non-Javadoc)
0863: * @see com.mockobjects.sql.MockDatabaseMetaData#usesLocalFilePerTable()
0864: */
0865: public boolean usesLocalFilePerTable() throws SQLException {
0866: // TODO Auto-generated method stub
0867: return false;
0868: }
0869:
0870: /* (non-Javadoc)
0871: * @see com.mockobjects.sql.MockDatabaseMetaData#usesLocalFiles()
0872: */
0873: public boolean usesLocalFiles() throws SQLException {
0874: // TODO Auto-generated method stub
0875: return false;
0876: }
0877:
0878: public ResultSet getCatalogs() throws SQLException {
0879: return catalogs;
0880: }
0881:
0882: public void setCatalogs(String[] catalogNames,
0883: SQLDatabaseMetaData md) {
0884: catalogs = new MockResultSet();
0885: TableColumnInfo[] cols = new TableColumnInfo[] { new TableColumnInfo(
0886: "aCatalog", // catalog
0887: "aSchema", // schema
0888: "", // tableName
0889: "", // columnName
0890: 1, // dataType; 1 == CHAR
0891: "", // typeName
0892: 0, // columnSize
0893: 0, // decimalDigits
0894: 0, // radix
0895: 0, // isNullAllowed
0896: "", "", // defaultValue
0897: 0, 0, "", // isNullable
0898: md) };
0899: catalogs.setTableColumnInfos(cols);
0900: for (int i = 0; i < catalogNames.length; i++) {
0901: catalogs.addRow(new Object[] { catalogNames[i] });
0902: }
0903: }
0904:
0905: public ResultSet getSchemas() throws SQLException {
0906: return schemas;
0907: }
0908:
0909: public void setSchemas(String[] schemaNames, SQLDatabaseMetaData md) {
0910: schemas = new MockResultSet(null);
0911: TableColumnInfo[] cols = new TableColumnInfo[] { new TableColumnInfo(
0912: "aCatalog", // catalog
0913: "aSchema", // schema
0914: "", // tableName
0915: "", // columnName
0916: 1, // dataType; 1 == CHAR
0917: "", // typeName
0918: 0, // columnSize
0919: 0, // decimalDigits
0920: 0, // radix
0921: 0, // isNullAllowed
0922: "", "", // defaultValue
0923: 0, 0, "", // isNullable
0924: md) };
0925: schemas.setTableColumnInfos(cols);
0926: for (int i = 0; i < schemaNames.length; i++) {
0927: schemas.addRow(new Object[] { schemaNames[i] });
0928: }
0929:
0930: }
0931:
0932: public String getSQLKeywords() throws SQLException {
0933: return "";
0934: }
0935:
0936: public void setSQLKeywords(String[] someKeywords) {
0937: StringBuffer tmp = new StringBuffer();
0938: for (int i = 0; i < someKeywords.length; i++) {
0939: tmp.append(someKeywords[i]);
0940: if (i < someKeywords.length) {
0941: tmp.append(",");
0942: }
0943: }
0944: keywords = tmp.toString();
0945: }
0946:
0947: public ResultSet getTypeInfo() throws SQLException {
0948: return new MockResultSet(null);
0949: }
0950:
0951: public ResultSet getProcedures(String catalog,
0952: String schemaPattern, String procedureNamrPattern)
0953: throws SQLException {
0954: return new MockResultSet(null);
0955: }
0956:
0957: public String getNumericFunctions() throws SQLException {
0958: return "";
0959: }
0960:
0961: public String getStringFunctions() throws SQLException {
0962: return "";
0963: }
0964:
0965: public ResultSet getTables(String aCatalog, String schemaPattern,
0966: String tableNamePattern, String[] types)
0967: throws SQLException {
0968: return new MockResultSet(null);
0969: }
0970:
0971: public String getTimeDateFunctions() throws SQLException {
0972: return "";
0973: }
0974:
0975: public void setCatalogTerm(String aCatalogTerm) {
0976: catalogTerm = aCatalogTerm;
0977: }
0978:
0979: public String getCatalogSeparator() {
0980: return ".";
0981: }
0982:
0983: public String getCatalogTerm() {
0984: return catalogTerm;
0985: }
0986:
0987: /**
0988: * @param schemaTerm the schemaTerm to set
0989: */
0990: public void setSchemaTerm(String schemaTerm) {
0991: this .schemaTerm = schemaTerm;
0992: }
0993:
0994: /**
0995: * @return the schemaTerm
0996: */
0997: public String getSchemaTerm() {
0998: return schemaTerm;
0999: }
1000:
1001: /**
1002: * @param procedureTerm the procedureTerm to set
1003: */
1004: public void setProcedureTerm(String procedureTerm) {
1005: this .procedureTerm = procedureTerm;
1006: }
1007:
1008: /**
1009: * @return the procedureTerm
1010: */
1011: public String getProcedureTerm() {
1012: return procedureTerm;
1013: }
1014:
1015: public String getDriverName() throws SQLException {
1016: return "MockDatabaseDriver";
1017: }
1018:
1019: }
|