Compare commits

..

38 Commits

Author SHA1 Message Date
nrousseau
b7b1e79a01 TPS-1070 patch: [5.4.1]NoClassDefFoundError when execute rule in no GUI
server(TDI-32615)
https://jira.talendforge.org/browse/TPS-1070
2015-09-07 14:11:19 +08:00
xhkong
2780290c2c TDI-33278 Column length should be visible when length value is
zero
https://jira.talendforge.org/browse/TDI-33278
(fix the cell null → 0 & 0 → null)
2015-08-03 19:19:25 +08:00
xhkong
c0f67fb7b1 Revert "TDI-33278 Column length should be visible when length value is zero https://jira.talendforge.org/browse/TDI-33278 (fix the cell null → 0 & 0 → null)"
This reverts commit 2096e468ce.
2015-08-03 19:15:21 +08:00
xhkong
2096e468ce TDI-33278 Column length should be visible when length value is
zero
https://jira.talendforge.org/browse/TDI-33278
(fix the cell null → 0 & 0 → null)
2015-08-03 19:10:52 +08:00
xhkong
0effa6b031 TDI-33278 Column length should be visible when length value is zero
https://jira.talendforge.org/browse/TDI-33278
2015-07-31 13:40:45 +08:00
iwangtalend
d9ae3739f5 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:08:44 +02:00
iwangtalend
03eb0980fc TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:08:33 +02:00
iwangtalend
825899757f TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:08:19 +02:00
iwangtalend
3c32958006 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:07:04 +02:00
iwangtalend
409f2d7d73 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:06:51 +02:00
iwangtalend
982c7ddffe TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:06:39 +02:00
iwangtalend
ca08f98474 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:06:26 +02:00
iwangtalend
11b42186bd TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:06:14 +02:00
iwangtalend
2486951d4d TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:06:01 +02:00
iwangtalend
f42bc931ec TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:05:47 +02:00
iwangtalend
eae0097086 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:05:33 +02:00
iwangtalend
bcda460b3e TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:05:18 +02:00
iwangtalend
cf6037bb60 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:05:06 +02:00
iwangtalend
34f6b70ad3 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:04:53 +02:00
iwangtalend
b7bb4661ec TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:04:41 +02:00
iwangtalend
2074a9569a TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 17:01:26 +02:00
iwangtalend
ebc2d62723 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 16:59:40 +02:00
iwangtalend
0e88de7f79 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 16:59:19 +02:00
iwangtalend
9c6a817270 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 16:58:43 +02:00
iwangtalend
af4eb2fcc1 TUP-1835 : Studio build properties : remove all references to empty folders 2015-07-17 16:57:33 +02:00
zshen-talend
5dc8713144 Merge pull request #200 from xqliu-talend/patch/5.4.1
TPS-951 TDQ-10298 show the rule name if it contain . and _
2015-05-25 17:02:28 +08:00
xqliu-talend
65df226960 TPS-951 TDQ-10298 show the rule name if it contain . and _ 2015-05-25 16:59:32 +08:00
hwang
b12fb7da66 TPS-750:[5.4.1] tFileInputEBCDIC - Schema editor: And to ensure this is
fixed in 5.6.1 (TDI-30936)
2014-11-12 17:00:21 +08:00
cmeng-talend
fb6a6d8877 TPS-725 : [5.4.1] Unable to retrieve salesforce modules from Salesforce
metadata connection(TDI-30366)
https://jira.talendforge.org/browse/TPS-725
2014-10-09 11:34:07 +08:00
Sébastien Gandon
390ce07a72 TPS-621 : [5.4.1] CDC component: Conversion into short table names in GUI (TDI-29052). 2014-06-22 14:47:05 +02:00
Sébastien Gandon
09b25f20a7 Commited by ldong for TPS-612:[5.4.1]studio stop responding when open data preview of table view stored in the reference project(TDI-28875). 2014-06-22 14:47:05 +02:00
Sébastien Gandon
8b10b93e9b Commited by ldong for TPS-619:[5.4.1] Studio Gives java.lang.unsupportedoperation exception when changing projects (TUP-1814). 2014-06-22 14:47:05 +02:00
Sébastien Gandon
4adbcafe6b Commited by ldong for Patch TPS-578:[5.4.1]Impossible to use Update site / archiva system(TUP-1645). 2014-06-22 14:47:05 +02:00
Sébastien Gandon
4ec56e7a4b Committed by hcyi for Patch TPS-580 : [5.4.1] Metadata wizard doesn't display tables starting with '/' (TDI-28578). 2014-06-22 14:47:05 +02:00
Sébastien Gandon
b9a7b126a1 commit for TPS-582. 2014-06-22 14:47:04 +02:00
Sébastien Gandon
92552edda6 Committed by hcyi for patch TPS-581 : [5.4.1]Metadata wizard does not show tables and views for IBM DB2 (TUP-1615). 2014-06-22 14:47:04 +02:00
Sébastien Gandon
ccd6bfe275 bug TDI-28435 fixed : Generation fails after generate another project's job with the same name routines. 2014-06-22 14:47:04 +02:00
Sébastien Gandon
efa93e6395 Merge release/5.4.1/tis_shared and release/5.4.1/tos for release/5.4.1. 2014-06-22 14:17:13 +02:00
2299 changed files with 6637 additions and 14577 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -124,9 +124,6 @@ ModelSelectionDialog.ViewSchema=View schema (read only).
ModelSelectionDialog.newViewSchema=View schema
ModelSelectionDialog.ViewQuery=View query (read only).
ModelSelectionDialog.Update=Update repository connection.
SSLConfirmDialog.KeyStore=please input keyStore
SSLConfirmDialog.TrustStore=please input trustStore
SSLConfirmDialog.Password=please input password
FileStep2.previewFailure=Preview error. Some settings must be changed.\nNote\: Preview errors are generally due to a wrong encoding setting.
GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been registered.
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=The xml can't parse.

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
@@ -61,9 +61,9 @@ public enum ECoreImage implements IImage {
CONTEXT_WIZ("/icons1/context_wiz.png"), //$NON-NLS-1$
CODE_ICON("/icons1/code.png"), //$NON-NLS-1$
ROUTINE_ICON("/icons1/routine.gif"), //$NON-NLS-1$
JOB_SCRIPTS_ICON("/icons1/job_scripts.png"), //$NON-NLS-1$
JOB_SCRIPTS_TOOLBAR_ICON("/icons1/job_script_toolbar.png"), //$NON-NLS-1$
FTP_ICON("/icons1/ftp.png"), //$NON-NLS-1$
JOB_SCRIPTS_ICON("/icons1/job_scripts.png"),
JOB_SCRIPTS_TOOLBAR_ICON("/icons1/job_script_toolbar.png"),
FTP_ICON("/icons1/ftp.png"),
ROUTINE_WIZ("/icons1/routine_wiz.png"), //$NON-NLS-1$
SNIPPETS_ICON("/icons1/snippet.png"), //$NON-NLS-1$
// SUBROUTINE_ICON("/icons1/subroutine.gif"),
@@ -94,13 +94,13 @@ public enum ECoreImage implements IImage {
METADATA_SAPCONNECTION_ICON("/icons1/sapconnection.png"), //$NON-NLS-1$
METADATA_SAPCONNECTION_WIZ("/icons1/connection_wiz.gif"), //$NON-NLS-1$
METADATA_HEADERFOOTER_ICON("/icons1/headerfooter_icon32.png"), //$NON-NLS-1$
METADATA_HEADERFOOTER_ICON("/icons1/headerfooter_icon32.png"),
METADATA_SQLPATTERN_ICON("/icons1/SQLPattern.png"), //$NON-NLS-1$
METADATA_SQLPATTERN_WIZ("/icons1/defaultWizard.png"), //$NON-NLS-1$
METADATA_TABLE_ICON("/icons1/table.gif"), //$NON-NLS-1$
METADATA_COLUMN_ICON("/icons1/columns.gif"), //$NON-NLS-1$
METADATA_COLUMN_ICON("/icons1/columns.gif"),
METADATA_TABLE_WIZ("/icons1/table_wiz.png"), //$NON-NLS-1$
METADATA_VIEW_ICON("/icons1/view.gif"), //$NON-NLS-1$
METADATA_SYNONYM_ICON("/icons1/synonym.gif"), //$NON-NLS-1$
@@ -123,7 +123,7 @@ public enum ECoreImage implements IImage {
METADATA_SALESFORCE_SCHEMA_ICON("/icons1/salesforce_icon.png"), //$NON-NLS-1$
METADATA_VALIDATION_RULES_ICON("/icons1/metadata.png"), //$NON-NLS-1$
METADATA_VALIDATION_RULES_WIZ("/icons1/delimited_wiz.png"), //$NON-NLS-1$
METADATA_EDIFACT_ICON("/icons1/EDIField.png"), //$NON-NLS-1$
METADATA_EDIFACT_ICON("/icons1/EDIField.png"),
MODULE_INSTALLED_ICON("/icons1/checked.gif"), //$NON-NLS-1$
MODULE_ERROR_ICON("/icons1/error.gif"), //$NON-NLS-1$
MODULE_WARNING_ICON("/icons1/warning.gif"), //$NON-NLS-1$
@@ -171,25 +171,13 @@ public enum ECoreImage implements IImage {
PROGRESSGRAYBAR("/icons1/gray.gif"), //$NON-NLS-1$
PROGRESSGRAYGEBAR("/icons1/graygeBar.gif"), //$NON-NLS-1$
TRIANGLE("/icons1/triangle.gif"), // triangle.gif //$NON-NLS-1$
COMPARE("/icons1/compare.gif"), //$NON-NLS-1$
EXCHNAGETAB("/icons/exchangeTab.jpg"), //$NON-NLS-1$
EXCHNAGEIMAGEMISSING("/icons/component_missing.gif"), //$NON-NLS-1$
STATUS_OK("/icons/ok.png"), //$NON-NLS-1$
COMPARE("/icons1/compare.gif"),
EXCHNAGETAB("/icons/exchangeTab.jpg"), // $NON-NLS-1$
EXCHNAGEIMAGEMISSING("/icons/component_missing.gif"),
STATUS_OK("/icons/ok.png"), // $NON-NLS-1$
MRGREEBAR("/icons1/mrGreeBar.gif"), //$NON-NLS-1$
MRREDBAR("/icons1/mrRedBar.gif"), //$NON-NLS-1$
MRGRAYBAR("/icons1/mrGrayBar.gif"), //$NON-NLS-1$
TDQ_ANALYSIS_ICON("/icons1/tdq/chart_bar.png"), //$NON-NLS-1$
TDQ_RULE_ICON("/icons1/tdq/dqrule_red.png"), //$NON-NLS-1$
TDQ_MATCH_RULE_ICON("/icons1/tdq/match_rule.png"), //$NON-NLS-1$
TDQ_INDICATOR_ICON("/icons1/tdq/IndicatorDefinition.gif"), //$NON-NLS-1$
TDQ_PATTERN_ICON("/icons1/tdq/pattern.png"), //$NON-NLS-1$
TDQ_JRAXML_ICON("/icons1/tdq/xmldoc.gif"), //$NON-NLS-1$
TDQ_SOURCE_FILE_ICON("/icons1/tdq/editor.gif"), //$NON-NLS-1$
TDQ_REPORT_ICON("/icons1/tdq/report.png"), //$NON-NLS-1$
TDQ_EXCHANGE_ICON("/icons1/tdq/ecosystem_view.gif"), //$NON-NLS-1$
TDQ_LIBRARIES_ICON("/icons1/tdq/libraries.png"), //$NON-NLS-1$
TDQ_DATA_PROFILING_ICON("/icons1/tdq/server_chart.png"); //$NON-NLS-1$
MRGRAYBAR("/icons1/mrGrayBar.gif"); //$NON-NLS-1$
private String path;

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -2,7 +2,7 @@
//
// Talend Community Edition
//
// // Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// // Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
@@ -12,12 +12,12 @@
// ============================================================================
package org.talend.commons.utils.database;
import static org.junit.Assert.fail;
import static org.junit.Assert.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import junit.framework.Assert;
@@ -51,18 +51,44 @@ public class DB2ForZosDataBaseMetadataTest {
public void testGetTablescase1() {
String catalog = "tbi"; //$NON-NLS-1$
String schema = "dbo"; //$NON-NLS-1$
String exceptSql = "SELECT * FROM SYSIBM.SYSTABLES where CREATOR = '" + schema + "' and type in('T')"; //$NON-NLS-1$ //$NON-NLS-2$
String tableNamePattern = null;
String[] types = new String[] { TableType.TABLE.name() };
ResultSet resultSet = mockResultSet();
// java.sql.ResultSet mock
ResultSet resultSet = Mockito.mock(ResultSet.class);
try {
Mockito.when(resultSet.next()).thenReturn(true).thenReturn(false);
Mockito.when(resultSet.getString("NAME")).thenReturn("tableName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("CREATOR")).thenReturn("schemaName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("TYPE")).thenReturn("string"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (SQLException e3) {
fail(e3.getMessage());
}
// ~java.sql.ResultSet
// java.sql.Statment mock
PreparedStatement sqlStatement = mockPreparedStatement(resultSet);
Statement sqlStatement = Mockito.mock(Statement.class);
try {
Mockito.when(sqlStatement.executeQuery(exceptSql)).thenReturn(resultSet);
} catch (SQLException e2) {
fail(e2.getMessage());
}
// ~java.sql.Statment
// java.sql.Connection mock
Connection sqlConnection = mockConnection(sqlStatement);
Connection sqlConnection = Mockito.mock(Connection.class);
try {
Mockito.when(sqlConnection.createStatement()).thenReturn(sqlStatement);
} catch (SQLException e1) {
fail(e1.getMessage());
}
// ~java.sql.Connection
ResultSet tablesResult = mockMetadata(catalog, schema, tableNamePattern, types, sqlConnection);
DB2ForZosDataBaseMetadata db2ZosMetadata = new DB2ForZosDataBaseMetadata(sqlConnection);
ResultSet tablesResult = null;
try {
tablesResult = db2ZosMetadata.getTables(catalog, schema, tableNamePattern, types);
} catch (SQLException e) {
fail(e.getMessage());
}
Assert.assertTrue(tablesResult != null);
Assert.assertTrue(tablesResult instanceof DB2ForZosResultSet);
if (tablesResult instanceof DB2ForZosResultSet) {
@@ -87,18 +113,44 @@ public class DB2ForZosDataBaseMetadataTest {
String catalog = "tbi"; //$NON-NLS-1$
String schema = "dbo"; //$NON-NLS-1$
String tableNamePattern = null;
String exceptSql = "SELECT * FROM SYSIBM.SYSTABLES where CREATOR = '" + schema + "' and type in('T' , 'V' , 'S' , 'A')"; //$NON-NLS-1$ //$NON-NLS-2$
String[] types = new String[] { TableType.TABLE.name(), TableType.VIEW.name(), TableType.SYNONYM.name(),
TableType.ALIAS.name() };
ResultSet resultSet = mockResultSet();
// java.sql.ResultSet mock
ResultSet resultSet = Mockito.mock(ResultSet.class);
try {
Mockito.when(resultSet.next()).thenReturn(true).thenReturn(false);
Mockito.when(resultSet.getString("NAME")).thenReturn("tableName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("CREATOR")).thenReturn("schemaName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("TYPE")).thenReturn("string"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (SQLException e3) {
fail(e3.getMessage());
}
// ~java.sql.ResultSet
// java.sql.Statment mock
PreparedStatement sqlStatement = mockPreparedStatement(resultSet);
Statement sqlStatement = Mockito.mock(Statement.class);
try {
Mockito.when(sqlStatement.executeQuery(exceptSql)).thenReturn(resultSet);
} catch (SQLException e2) {
fail(e2.getMessage());
}
// ~java.sql.Statment
// java.sql.Connection mock
Connection sqlConnection = mockConnection(sqlStatement);
Connection sqlConnection = Mockito.mock(Connection.class);
try {
Mockito.when(sqlConnection.createStatement()).thenReturn(sqlStatement);
} catch (SQLException e1) {
fail(e1.getMessage());
}
// ~java.sql.Connection
ResultSet tablesResult = mockMetadata(catalog, schema, tableNamePattern, types, sqlConnection);
DB2ForZosDataBaseMetadata db2ZosMetadata = new DB2ForZosDataBaseMetadata(sqlConnection);
ResultSet tablesResult = null;
try {
tablesResult = db2ZosMetadata.getTables(catalog, schema, tableNamePattern, types);
} catch (SQLException e) {
fail(e.getMessage());
}
Assert.assertTrue(tablesResult != null);
Assert.assertTrue(tablesResult instanceof DB2ForZosResultSet);
if (tablesResult instanceof DB2ForZosResultSet) {
@@ -123,17 +175,44 @@ public class DB2ForZosDataBaseMetadataTest {
String catalog = "tbi"; //$NON-NLS-1$
String schema = null;
String tableNamePattern = null;
String exceptSql = "SELECT * FROM SYSIBM.SYSTABLES where type in('T' , 'V' , 'S' , 'A')"; //$NON-NLS-1$
String[] types = new String[] { TableType.TABLE.name(), TableType.VIEW.name(), TableType.SYNONYM.name(),
TableType.ALIAS.name() };
ResultSet resultSet = mockResultSet();
// java.sql.ResultSet mock
ResultSet resultSet = Mockito.mock(ResultSet.class);
try {
Mockito.when(resultSet.next()).thenReturn(true).thenReturn(false);
Mockito.when(resultSet.getString("NAME")).thenReturn("tableName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("CREATOR")).thenReturn("schemaName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("TYPE")).thenReturn("string"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (SQLException e3) {
fail(e3.getMessage());
}
// ~java.sql.ResultSet
// java.sql.Statment mock
PreparedStatement sqlStatement = mockPreparedStatement(resultSet);
Statement sqlStatement = Mockito.mock(Statement.class);
try {
Mockito.when(sqlStatement.executeQuery(exceptSql)).thenReturn(resultSet);
} catch (SQLException e2) {
fail(e2.getMessage());
}
// ~java.sql.Statment
// java.sql.Connection mock
Connection sqlConnection = mockConnection(sqlStatement);
Connection sqlConnection = Mockito.mock(Connection.class);
try {
Mockito.when(sqlConnection.createStatement()).thenReturn(sqlStatement);
} catch (SQLException e1) {
fail(e1.getMessage());
}
// ~java.sql.Connection
ResultSet tablesResult = mockMetadata(catalog, schema, tableNamePattern, types, sqlConnection);
DB2ForZosDataBaseMetadata db2ZosMetadata = new DB2ForZosDataBaseMetadata(sqlConnection);
ResultSet tablesResult = null;
try {
tablesResult = db2ZosMetadata.getTables(catalog, schema, tableNamePattern, types);
} catch (SQLException e) {
fail(e.getMessage());
}
Assert.assertTrue(tablesResult != null);
Assert.assertTrue(tablesResult instanceof DB2ForZosResultSet);
if (tablesResult instanceof DB2ForZosResultSet) {
@@ -158,18 +237,43 @@ public class DB2ForZosDataBaseMetadataTest {
String catalog = "tbi"; //$NON-NLS-1$
String schema = null;
String tableNamePattern = null;
String exceptSql = "SELECT * FROM SYSIBM.SYSTABLES where type in('T')"; //$NON-NLS-1$
String[] types = new String[] { TableType.TABLE.name() };
// java.sql.ResultSet mock
ResultSet resultSet = mockResultSet();
ResultSet resultSet = Mockito.mock(ResultSet.class);
try {
Mockito.when(resultSet.next()).thenReturn(true).thenReturn(false);
Mockito.when(resultSet.getString("NAME")).thenReturn("tableName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("CREATOR")).thenReturn("schemaName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("TYPE")).thenReturn("string"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (SQLException e3) {
fail(e3.getMessage());
}
// ~java.sql.ResultSet
// java.sql.Statment mock
PreparedStatement sqlStatement = mockPreparedStatement(resultSet);
Statement sqlStatement = Mockito.mock(Statement.class);
try {
Mockito.when(sqlStatement.executeQuery(exceptSql)).thenReturn(resultSet);
} catch (SQLException e2) {
fail(e2.getMessage());
}
// ~java.sql.Statment
// java.sql.Connection mock
Connection sqlConnection = mockConnection(sqlStatement);
Connection sqlConnection = Mockito.mock(Connection.class);
try {
Mockito.when(sqlConnection.createStatement()).thenReturn(sqlStatement);
} catch (SQLException e1) {
fail(e1.getMessage());
}
// ~java.sql.Connection
ResultSet tablesResult = mockMetadata(catalog, schema, tableNamePattern, types, sqlConnection);
DB2ForZosDataBaseMetadata db2ZosMetadata = new DB2ForZosDataBaseMetadata(sqlConnection);
ResultSet tablesResult = null;
try {
tablesResult = db2ZosMetadata.getTables(catalog, schema, tableNamePattern, types);
} catch (SQLException e) {
fail(e.getMessage());
}
Assert.assertTrue(tablesResult != null);
Assert.assertTrue(tablesResult instanceof DB2ForZosResultSet);
if (tablesResult instanceof DB2ForZosResultSet) {
@@ -182,78 +286,4 @@ public class DB2ForZosDataBaseMetadataTest {
}
}
/**
* DOC yyin Comment method "mockMetadata".
*
* @param catalog
* @param schema
* @param tableNamePattern
* @param types
* @param sqlConnection
* @return
*/
private ResultSet mockMetadata(String catalog, String schema, String tableNamePattern, String[] types,
Connection sqlConnection) {
DB2ForZosDataBaseMetadata db2ZosMetadata = null;
ResultSet tablesResult = null;
try {
db2ZosMetadata = new DB2ForZosDataBaseMetadata(sqlConnection);
tablesResult = db2ZosMetadata.getTables(catalog, schema, tableNamePattern, types);
} catch (SQLException e) {
fail(e.getMessage());
}
return tablesResult;
}
/**
* DOC yyin Comment method "mockResultSet".
*
* @return
*/
private ResultSet mockResultSet() {
ResultSet resultSet = Mockito.mock(ResultSet.class);
try {
Mockito.when(resultSet.next()).thenReturn(true).thenReturn(false);
Mockito.when(resultSet.getString("NAME")).thenReturn("tableName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("CREATOR")).thenReturn("schemaName"); //$NON-NLS-1$ //$NON-NLS-2$
Mockito.when(resultSet.getString("TYPE")).thenReturn("string"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (SQLException e3) {
fail(e3.getMessage());
}
return resultSet;
}
/**
* DOC yyin Comment method "mockPreparedStatement".
*
* @param resultSet
* @return
*/
private PreparedStatement mockPreparedStatement(ResultSet resultSet) {
PreparedStatement sqlStatement = Mockito.mock(PreparedStatement.class);
try {
Mockito.when(sqlStatement.executeQuery()).thenReturn(resultSet);
} catch (SQLException e2) {
fail(e2.getMessage());
}
return sqlStatement;
}
/**
* DOC yyin Comment method "mockConnection".
*
* @param exceptSql
* @param sqlStatement
* @return
*/
private Connection mockConnection(PreparedStatement sqlStatement) {
Connection sqlConnection = Mockito.mock(Connection.class);
try {
Mockito.when(sqlConnection.prepareStatement(Mockito.anyString())).thenReturn(sqlStatement);
} catch (SQLException e1) {
fail(e1.getMessage());
}
return sqlConnection;
}
}

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

View File

@@ -2,7 +2,7 @@
//
// Talend Community Edition
//
// Copyright (C) 2006-2014 Talend Ð www.talend.com
// Copyright (C) 2006-2013 Talend Ð www.talend.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@@ -1,6 +1,6 @@
// ============================================================================
//
// Copyright (C) 2006-2014 Talend Inc. - www.talend.com
// Copyright (C) 2006-2013 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

Some files were not shown because too many files have changed in this diff Show More