Skip to content

Commit

Permalink
[TEST] LoadSaveTests for Job Entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Tucker committed May 19, 2016
1 parent 6273fcb commit f42537b
Show file tree
Hide file tree
Showing 56 changed files with 1,956 additions and 289 deletions.
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.com
* Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com
*
*******************************************************************************
*
Expand All @@ -19,6 +19,7 @@
* limitations under the License.
*
******************************************************************************/

package org.pentaho.di.job.entries.checkdbconnection;

import org.pentaho.di.job.entry.validator.AndValidator;
Expand Down Expand Up @@ -60,7 +61,7 @@
public class JobEntryCheckDbConnections extends JobEntryBase implements Cloneable, JobEntryInterface {
private static Class<?> PKG = JobEntryCheckDbConnections.class; // for i18n purposes, needed by Translator2!!

public DatabaseMeta[] connections;
private DatabaseMeta[] connections;

public static final String[] unitTimeDesc = new String[] {
BaseMessages.getString( PKG, "JobEntryCheckDbConnections.UnitTimeMilliSecond.Label" ),
Expand All @@ -74,8 +75,8 @@ public class JobEntryCheckDbConnections extends JobEntryBase implements Cloneabl
public static final int UNIT_TIME_MINUTE = 2;
public static final int UNIT_TIME_HOUR = 3;

public String[] waitfors;
public int[] waittimes;
private String[] waitfors;
private int[] waittimes;

public JobEntryCheckDbConnections( String n ) {
super( n, "" );
Expand All @@ -93,6 +94,30 @@ public Object clone() {
return je;
}

public DatabaseMeta[] getConnections() {
return connections;
}

public void setConnections( DatabaseMeta[] connections ) {
this.connections = connections;
}

public String[] getWaitfors() {
return waitfors;
}

public void setWaitfors( String[] waitfors ) {
this.waitfors = waitfors;
}

public int[] getWaittimes() {
return waittimes;
}

public void setWaittimes( int[] waittimes ) {
this.waittimes = waittimes;
}

private static String getWaitTimeCode( int i ) {
if ( i < 0 || i >= unitTimeCode.length ) {
return unitTimeCode[0];
Expand Down
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.com
* Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down Expand Up @@ -63,7 +63,7 @@ public class JobEntryColumnsExist extends JobEntryBase implements Cloneable, Job
private String schemaname;
private String tablename;
private DatabaseMeta connection;
public String[] arguments;
private String[] arguments;

public JobEntryColumnsExist( String n ) {
super( n, "" );
Expand Down Expand Up @@ -198,6 +198,14 @@ public String getSchemaname() {
return schemaname;
}

public String[] getArguments() {
return arguments;
}

public void setArguments( String[] arguments ) {
this.arguments = arguments;
}

public void setDatabase( DatabaseMeta database ) {
this.connection = database;
}
Expand Down
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2015 by Pentaho : http://www.pentaho.com
* Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down Expand Up @@ -721,7 +721,7 @@ private class TextFileSelector implements FileSelector {
/**********************************************************
*
* @param selectedfile
* @param wildcard
* @param sourceWildcard
* @return True if the selectedfile matches the wildcard
**********************************************************/
private boolean GetFileWildcard( String selectedfile ) {
Expand Down
Expand Up @@ -2,7 +2,7 @@
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.com
* Copyright (C) 2002-2016 by Pentaho : http://www.pentaho.com
*
*******************************************************************************
*
Expand Down Expand Up @@ -666,7 +666,7 @@ private String getDestinationFilename( String shortsourcefilename ) throws Excep
/**********************************************************
*
* @param selectedfile
* @param wildcard
* @param sourceWildcard
* @return True if the selectedfile matches the wildcard
**********************************************************/
private boolean CheckFileWildcard( String selectedfile, Pattern pattern, boolean include ) {
Expand Down

0 comments on commit f42537b

Please sign in to comment.