List of usage examples for java.sql DatabaseMetaData equals
public boolean equals(Object obj)
From source file:org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.java
/** * DOC cantoine. Method to return a Collection of Tables for a DB connection. * /* ww w . j a v a2 s . c o m*/ * @param DatabaseMetaData dbMetaData * @return Collection of MetadataTable */ public static List<IMetadataTable> extractTablesFromDB(DatabaseMetaData dbMetaData, IMetadataConnection iMetadataConnection, int... limit) { String schema = iMetadataConnection.getSchema(); ExtractManager extractManager = ExtractManagerFactory.createByDisplayName(iMetadataConnection.getDbType()); if (extractManager != null) { schema = extractManager.getSchema(iMetadataConnection); } if (dbMetaData.equals(oldMetadata) && schema.equals(oldSchema) && (limit == null && oldLimit == null || Arrays.equals(limit, oldLimit)) && (oldUseAllSynonyms == ExtractMetaDataUtils.getInstance().isUseAllSynonyms())) { return oldMetadataRetrieved; } List<IMetadataTable> medataTables = new ArrayList<IMetadataTable>(); if (extractManager != null) { medataTables = extractManager.extractTablesFromDB(dbMetaData, iMetadataConnection, limit); // tableTypeMap.putAll(extractManager.getTableTypeMap()); } oldMetadata = dbMetaData; oldSchema = schema; oldLimit = limit; oldUseAllSynonyms = ExtractMetaDataUtils.getInstance().isUseAllSynonyms(); oldMetadataRetrieved = medataTables; return medataTables; }