JcrMetaData implements DatabaseMetaData { @Override public ResultSet getExportedKeys( String catalog, String schema, String table ) throws SQLException { return getImportedKeys(catalog, schema, table); } JcrMetaData( JcrConnection connection ); @Override ResultSet getPseudoColumns( String catalog,
                                       String schemaPattern,
                                       String tableNamePattern,
                                       String columnNamePattern ); @Override boolean generatedKeyAlwaysReturned(); @Override int getDriverMajorVersion(); @Override int getDriverMinorVersion(); @Override String getDriverName(); @Override String getDriverVersion(); @Override int getDatabaseMajorVersion(); @Override int getDatabaseMinorVersion(); @Override String getDatabaseProductName(); String getDatabaseProductUrl(); @Override String getDatabaseProductVersion(); @Override int getJDBCMajorVersion(); @Override int getJDBCMinorVersion(); @Override Connection getConnection(); @Override boolean isReadOnly(); @Override boolean allProceduresAreCallable(); @Override boolean allTablesAreSelectable(); @Override boolean autoCommitFailureClosesAllResultSets(); @Override boolean dataDefinitionCausesTransactionCommit(); @Override boolean dataDefinitionIgnoredInTransactions(); @Override boolean deletesAreDetected( int type ); @Override boolean doesMaxRowSizeIncludeBlobs(); @Override ResultSet getAttributes( String catalog,
                                    String schemaPattern,
                                    String typeNamePattern,
                                    String attributeNamePattern ); @Override ResultSet getBestRowIdentifier( String catalog,
                                           String schema,
                                           String table,
                                           int scope,
                                           boolean nullable ); @Override String getCatalogSeparator(); @Override String getCatalogTerm(); @SuppressWarnings( "unchecked" ) @Override ResultSet getCatalogs(); @Override ResultSet getClientInfoProperties(); @Override ResultSet getColumnPrivileges( String catalog,
                                          String schema,
                                          String table,
                                          String columnNamePattern ); @SuppressWarnings( "unchecked" ) @Override ResultSet getColumns( String catalog,
                                 String schemaPattern,
                                 String tableNamePattern,
                                 String columnNamePattern ); @Override ResultSet getCrossReference( String parentCatalog,
                                        String parentSchema,
                                        String parentTable,
                                        String foreignCatalog,
                                        String foreignSchema,
                                        String foreignTable ); @Override int getDefaultTransactionIsolation(); @Override ResultSet getExportedKeys( String catalog,
                                      String schema,
                                      String table ); @Override String getExtraNameCharacters(); @Override ResultSet getFunctionColumns( String catalog,
                                         String schemaPattern,
                                         String functionNamePattern,
                                         String columnNamePattern ); @Override ResultSet getFunctions( String catalog,
                                   String schemaPattern,
                                   String functionNamePattern ); @Override String getIdentifierQuoteString(); @Override ResultSet getImportedKeys( String catalog,
                                      String schema,
                                      String table ); @SuppressWarnings( "unchecked" ) @Override ResultSet getIndexInfo( String catalog,
                                   String schema,
                                   String tableNamePattern,
                                   boolean unique,
                                   boolean approximate ); @Override int getMaxBinaryLiteralLength(); @Override int getMaxCatalogNameLength(); @Override int getMaxCharLiteralLength(); @Override int getMaxColumnNameLength(); @Override int getMaxColumnsInGroupBy(); @Override int getMaxColumnsInIndex(); @Override int getMaxColumnsInOrderBy(); @Override int getMaxColumnsInSelect(); @Override int getMaxColumnsInTable(); @Override int getMaxConnections(); @Override int getMaxCursorNameLength(); @Override int getMaxIndexLength(); @Override int getMaxProcedureNameLength(); @Override int getMaxRowSize(); @Override int getMaxSchemaNameLength(); @Override int getMaxStatementLength(); @Override int getMaxStatements(); @Override int getMaxTableNameLength(); @Override int getMaxTablesInSelect(); @Override int getMaxUserNameLength(); @Override String getNumericFunctions(); @SuppressWarnings( "unchecked" ) @Override ResultSet getPrimaryKeys( String catalog,
                                     String schema,
                                     String tableNamePattern ); @Override ResultSet getProcedureColumns( String catalog,
                                          String schemaPattern,
                                          String procedureNamePattern,
                                          String columnNamePattern ); @Override String getProcedureTerm(); @Override ResultSet getProcedures( String catalog,
                                    String schemaPattern,
                                    String procedureNamePattern ); @Override int getResultSetHoldability(); @Override RowIdLifetime getRowIdLifetime(); @Override String getSQLKeywords(); @Override int getSQLStateType(); @Override String getSchemaTerm(); @SuppressWarnings( "unchecked" ) @Override ResultSet getSchemas(); @Override ResultSet getSchemas( String catalog,
                                 String schemaPattern ); @Override String getSearchStringEscape(); @Override String getStringFunctions(); @Override ResultSet getSuperTables( String catalog,
                                     String schemaPattern,
                                     String tableNamePattern ); @Override ResultSet getSuperTypes( String catalog,
                                    String schemaPattern,
                                    String typeNamePattern ); @Override String getSystemFunctions(); @Override ResultSet getTablePrivileges( String catalog,
                                         String schemaPattern,
                                         String tableNamePattern ); @SuppressWarnings( "unchecked" ) @Override ResultSet getTableTypes(); @SuppressWarnings( "unchecked" ) @Override ResultSet getTables( String catalog,
                                String schemaPattern,
                                String tableNamePattern,
                                String[] types ); @Override String getTimeDateFunctions(); @Override ResultSet getTypeInfo(); @Override ResultSet getUDTs( String catalog,
                              String schemaPattern,
                              String typeNamePattern,
                              int[] types ); @Override String getURL(); @Override String getUserName(); @Override ResultSet getVersionColumns( String catalog,
                                        String schema,
                                        String table ); @Override boolean insertsAreDetected( int type ); @Override boolean isCatalogAtStart(); @Override boolean locatorsUpdateCopy(); @Override boolean nullPlusNonNullIsNull(); @Override boolean nullsAreSortedAtEnd(); @Override boolean nullsAreSortedAtStart(); @Override boolean nullsAreSortedHigh(); @Override boolean nullsAreSortedLow(); @Override boolean othersDeletesAreVisible( int type ); @Override boolean othersInsertsAreVisible( int type ); @Override boolean othersUpdatesAreVisible( int type ); @Override boolean ownDeletesAreVisible( int type ); @Override boolean ownInsertsAreVisible( int type ); @Override boolean ownUpdatesAreVisible( int type ); @Override boolean storesLowerCaseIdentifiers(); @Override boolean storesLowerCaseQuotedIdentifiers(); @Override boolean storesMixedCaseIdentifiers(); @Override boolean storesMixedCaseQuotedIdentifiers(); @Override boolean storesUpperCaseIdentifiers(); @Override boolean storesUpperCaseQuotedIdentifiers(); @Override boolean supportsANSI92EntryLevelSQL(); @Override boolean supportsANSI92FullSQL(); @Override boolean supportsANSI92IntermediateSQL(); @Override boolean supportsAlterTableWithAddColumn(); @Override boolean supportsAlterTableWithDropColumn(); @Override boolean supportsBatchUpdates(); @Override boolean supportsCatalogsInDataManipulation(); @Override boolean supportsCatalogsInIndexDefinitions(); @Override boolean supportsCatalogsInPrivilegeDefinitions(); @Override boolean supportsCatalogsInProcedureCalls(); @Override boolean supportsCatalogsInTableDefinitions(); @Override boolean supportsColumnAliasing(); @Override boolean supportsConvert(); @Override boolean supportsConvert( int fromType,
                                    int toType ); @Override boolean supportsCoreSQLGrammar(); @Override boolean supportsCorrelatedSubqueries(); @Override boolean supportsDataDefinitionAndDataManipulationTransactions(); @Override boolean supportsDataManipulationTransactionsOnly(); @Override boolean supportsDifferentTableCorrelationNames(); @Override boolean supportsExpressionsInOrderBy(); @Override boolean supportsExtendedSQLGrammar(); @Override boolean supportsFullOuterJoins(); @Override boolean supportsGetGeneratedKeys(); @Override boolean supportsGroupBy(); @Override boolean supportsGroupByBeyondSelect(); @Override boolean supportsGroupByUnrelated(); @Override boolean supportsIntegrityEnhancementFacility(); @Override boolean supportsLikeEscapeClause(); @Override boolean supportsLimitedOuterJoins(); @Override boolean supportsMinimumSQLGrammar(); @Override boolean supportsMixedCaseIdentifiers(); @Override boolean supportsMixedCaseQuotedIdentifiers(); @Override boolean supportsMultipleOpenResults(); @Override boolean supportsMultipleResultSets(); @Override boolean supportsMultipleTransactions(); @Override boolean supportsNamedParameters(); @Override boolean supportsNonNullableColumns(); @Override boolean supportsOpenCursorsAcrossCommit(); @Override boolean supportsOpenCursorsAcrossRollback(); @Override boolean supportsOpenStatementsAcrossCommit(); @Override boolean supportsOpenStatementsAcrossRollback(); @Override boolean supportsOrderByUnrelated(); @Override boolean supportsOuterJoins(); @Override boolean supportsPositionedDelete(); @Override boolean supportsPositionedUpdate(); @Override boolean supportsResultSetConcurrency( int type,
                                                 int concurrency ); @Override boolean supportsResultSetHoldability( int holdability ); @Override boolean supportsResultSetType( int type ); @Override boolean supportsSavepoints(); @Override boolean supportsSchemasInDataManipulation(); @Override boolean supportsSchemasInIndexDefinitions(); @Override boolean supportsSchemasInPrivilegeDefinitions(); @Override boolean supportsSchemasInProcedureCalls(); @Override boolean supportsSchemasInTableDefinitions(); @Override boolean supportsSelectForUpdate(); @Override boolean supportsStatementPooling(); @Override boolean supportsStoredFunctionsUsingCallSyntax(); @Override boolean supportsStoredProcedures(); @Override boolean supportsSubqueriesInComparisons(); @Override boolean supportsSubqueriesInExists(); @Override boolean supportsSubqueriesInIns(); @Override boolean supportsSubqueriesInQuantifieds(); @Override boolean supportsTableCorrelationNames(); @Override boolean supportsTransactionIsolationLevel( int level ); @Override boolean supportsTransactions(); @Override boolean supportsUnion(); @Override boolean supportsUnionAll(); @Override boolean updatesAreDetected( int type ); @Override boolean usesLocalFilePerTable(); @Override boolean usesLocalFiles(); @Override boolean isWrapperFor( Class<?> iface ); @Override T unwrap( Class<T> iface );  }
@Test public void shouldImplementGetExportedKeys() throws Exception { ResultSet result = metadata.getExportedKeys(null, null, null); assertThat(result, is(notNullValue())); }