@Test public void cloneTest() throws Exception { DatabaseLookupMeta meta = new DatabaseLookupMeta(); meta.allocate( 2, 2 ); meta.setStreamKeyField1( new String[] { "aa", "bb" } ); meta.setTableKeyField( new String[] { "cc", "dd" } ); meta.setKeyCondition( new String[] { "ee", "ff" } ); meta.setStreamKeyField2( new String[] { "gg", "hh" } ); meta.setReturnValueField( new String[] { "ii", "jj" } ); meta.setReturnValueNewName( new String[] { "kk", "ll" } ); meta.setReturnValueDefault( new String[] { "mm", "nn" } ); meta.setReturnValueDefaultType( new int[] { 10, 50 } ); meta.setOrderByClause( "FOO DESC" ); DatabaseLookupMeta aClone = (DatabaseLookupMeta) meta.clone(); assertFalse( aClone == meta ); assertTrue( Arrays.equals( meta.getStreamKeyField1(), aClone.getStreamKeyField1() ) ); assertTrue( Arrays.equals( meta.getTableKeyField(), aClone.getTableKeyField() ) ); assertTrue( Arrays.equals( meta.getKeyCondition(), aClone.getKeyCondition() ) ); assertTrue( Arrays.equals( meta.getStreamKeyField2(), aClone.getStreamKeyField2() ) ); assertTrue( Arrays.equals( meta.getReturnValueField(), aClone.getReturnValueField() ) ); assertTrue( Arrays.equals( meta.getReturnValueNewName(), aClone.getReturnValueNewName() ) ); assertTrue( Arrays.equals( meta.getReturnValueDefault(), aClone.getReturnValueDefault() ) ); assertTrue( Arrays.equals( meta.getReturnValueDefaultType(), aClone.getReturnValueDefaultType() ) ); assertEquals( meta.getOrderByClause(), aClone.getOrderByClause() ); assertEquals( meta.getXML(), aClone.getXML() ); }
@Override public Object clone() { DatabaseLookupMeta retval = (DatabaseLookupMeta) super.clone(); int nrkeys = streamKeyField1.length; int nrvalues = returnValueField.length; retval.allocate( nrkeys, nrvalues ); System.arraycopy( streamKeyField1, 0, retval.streamKeyField1, 0, nrkeys ); System.arraycopy( tableKeyField, 0, retval.tableKeyField, 0, nrkeys ); System.arraycopy( keyCondition, 0, retval.keyCondition, 0, nrkeys ); System.arraycopy( streamKeyField2, 0, retval.streamKeyField2, 0, nrkeys ); System.arraycopy( returnValueField, 0, retval.returnValueField, 0, nrvalues ); System.arraycopy( returnValueNewName, 0, retval.returnValueNewName, 0, nrvalues ); System.arraycopy( returnValueDefault, 0, retval.returnValueDefault, 0, nrvalues ); System.arraycopy( returnValueDefaultType, 0, retval.returnValueDefaultType, 0, nrvalues ); return retval; }
DatabaseLookupMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesModelerMeta { @Override public Object clone() { DatabaseLookupMeta retval = (DatabaseLookupMeta) super.clone(); int nrkeys = streamKeyField1.length; int nrvalues = returnValueField.length; retval.allocate( nrkeys, nrvalues ); System.arraycopy( streamKeyField1, 0, retval.streamKeyField1, 0, nrkeys ); System.arraycopy( tableKeyField, 0, retval.tableKeyField, 0, nrkeys ); System.arraycopy( keyCondition, 0, retval.keyCondition, 0, nrkeys ); System.arraycopy( streamKeyField2, 0, retval.streamKeyField2, 0, nrkeys ); System.arraycopy( returnValueField, 0, retval.returnValueField, 0, nrvalues ); System.arraycopy( returnValueNewName, 0, retval.returnValueNewName, 0, nrvalues ); System.arraycopy( returnValueDefault, 0, retval.returnValueDefault, 0, nrvalues ); System.arraycopy( returnValueDefaultType, 0, retval.returnValueDefaultType, 0, nrvalues ); return retval; } }
DatabaseLookupMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesModelerMeta { @Override public Object clone() { DatabaseLookupMeta retval = (DatabaseLookupMeta) super.clone(); int nrkeys = streamKeyField1.length; int nrvalues = returnValueField.length; retval.allocate( nrkeys, nrvalues ); System.arraycopy( streamKeyField1, 0, retval.streamKeyField1, 0, nrkeys ); System.arraycopy( tableKeyField, 0, retval.tableKeyField, 0, nrkeys ); System.arraycopy( keyCondition, 0, retval.keyCondition, 0, nrkeys ); System.arraycopy( streamKeyField2, 0, retval.streamKeyField2, 0, nrkeys ); System.arraycopy( returnValueField, 0, retval.returnValueField, 0, nrvalues ); System.arraycopy( returnValueNewName, 0, retval.returnValueNewName, 0, nrvalues ); System.arraycopy( returnValueDefault, 0, retval.returnValueDefault, 0, nrvalues ); System.arraycopy( returnValueDefaultType, 0, retval.returnValueDefaultType, 0, nrvalues ); return retval; } DatabaseLookupMeta(); }
DatabaseLookupMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesModelerMeta { @Override public Object clone() { DatabaseLookupMeta retval = (DatabaseLookupMeta) super.clone(); int nrkeys = streamKeyField1.length; int nrvalues = returnValueField.length; retval.allocate( nrkeys, nrvalues ); System.arraycopy( streamKeyField1, 0, retval.streamKeyField1, 0, nrkeys ); System.arraycopy( tableKeyField, 0, retval.tableKeyField, 0, nrkeys ); System.arraycopy( keyCondition, 0, retval.keyCondition, 0, nrkeys ); System.arraycopy( streamKeyField2, 0, retval.streamKeyField2, 0, nrkeys ); System.arraycopy( returnValueField, 0, retval.returnValueField, 0, nrvalues ); System.arraycopy( returnValueNewName, 0, retval.returnValueNewName, 0, nrvalues ); System.arraycopy( returnValueDefault, 0, retval.returnValueDefault, 0, nrvalues ); System.arraycopy( returnValueDefaultType, 0, retval.returnValueDefaultType, 0, nrvalues ); return retval; } DatabaseLookupMeta(); boolean isCached(); void setCached( boolean cached ); int getCacheSize(); void setCacheSize( int cacheSize ); @Override DatabaseMeta getDatabaseMeta(); @Override String getTableName(); void setDatabaseMeta( DatabaseMeta database ); String[] getKeyCondition(); void setKeyCondition( String[] keyCondition ); String getOrderByClause(); void setOrderByClause( String orderByClause ); String[] getReturnValueDefault(); void setReturnValueDefault( String[] returnValueDefault ); int[] getReturnValueDefaultType(); void setReturnValueDefaultType( int[] returnValueDefaultType ); String[] getReturnValueField(); void setReturnValueField( String[] returnValueField ); String[] getReturnValueNewName(); void setReturnValueNewName( String[] returnValueNewName ); String[] getStreamKeyField1(); void setStreamKeyField1( String[] streamKeyField1 ); String[] getStreamKeyField2(); void setStreamKeyField2( String[] streamKeyField2 ); String[] getTableKeyField(); void setTableKeyField( String[] tableKeyField ); String getTablename(); void setTablename( String tablename ); boolean isFailingOnMultipleResults(); void setFailingOnMultipleResults( boolean failOnMultipleResults ); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocate( int nrkeys, int nrvalues ); @Override Object clone(); @Override void setDefault(); @Override void getFields( RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); @Override String getXML(); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
      Repository repository, IMetaStore metaStore ); @Override RowMetaInterface getTableFields(); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
      TransMeta transMeta, Trans trans ); @Override StepDataInterface getStepData(); @Override void analyseImpact( List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepinfo,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository,
      IMetaStore metaStore ); @Override DatabaseMeta[] getUsedDatabaseConnections(); boolean isEatingRowOnLookupFailure(); void setEatingRowOnLookupFailure( boolean eatingRowOnLookupFailure ); @Override String getSchemaName(); @Override String getMissingDatabaseConnectionInformationMessage(); void setSchemaName( String schemaName ); @Override boolean supportsErrorHandling(); boolean isLoadingAllDataInCache(); void setLoadingAllDataInCache( boolean loadingAllDataInCache ); @Override RowMeta getRowMeta( StepDataInterface stepData ); @Override List<String> getDatabaseFields(); @Override List<String> getStreamFields(); }
DatabaseLookupMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesModelerMeta { @Override public Object clone() { DatabaseLookupMeta retval = (DatabaseLookupMeta) super.clone(); int nrkeys = streamKeyField1.length; int nrvalues = returnValueField.length; retval.allocate( nrkeys, nrvalues ); System.arraycopy( streamKeyField1, 0, retval.streamKeyField1, 0, nrkeys ); System.arraycopy( tableKeyField, 0, retval.tableKeyField, 0, nrkeys ); System.arraycopy( keyCondition, 0, retval.keyCondition, 0, nrkeys ); System.arraycopy( streamKeyField2, 0, retval.streamKeyField2, 0, nrkeys ); System.arraycopy( returnValueField, 0, retval.returnValueField, 0, nrvalues ); System.arraycopy( returnValueNewName, 0, retval.returnValueNewName, 0, nrvalues ); System.arraycopy( returnValueDefault, 0, retval.returnValueDefault, 0, nrvalues ); System.arraycopy( returnValueDefaultType, 0, retval.returnValueDefaultType, 0, nrvalues ); return retval; } DatabaseLookupMeta(); boolean isCached(); void setCached( boolean cached ); int getCacheSize(); void setCacheSize( int cacheSize ); @Override DatabaseMeta getDatabaseMeta(); @Override String getTableName(); void setDatabaseMeta( DatabaseMeta database ); String[] getKeyCondition(); void setKeyCondition( String[] keyCondition ); String getOrderByClause(); void setOrderByClause( String orderByClause ); String[] getReturnValueDefault(); void setReturnValueDefault( String[] returnValueDefault ); int[] getReturnValueDefaultType(); void setReturnValueDefaultType( int[] returnValueDefaultType ); String[] getReturnValueField(); void setReturnValueField( String[] returnValueField ); String[] getReturnValueNewName(); void setReturnValueNewName( String[] returnValueNewName ); String[] getStreamKeyField1(); void setStreamKeyField1( String[] streamKeyField1 ); String[] getStreamKeyField2(); void setStreamKeyField2( String[] streamKeyField2 ); String[] getTableKeyField(); void setTableKeyField( String[] tableKeyField ); String getTablename(); void setTablename( String tablename ); boolean isFailingOnMultipleResults(); void setFailingOnMultipleResults( boolean failOnMultipleResults ); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocate( int nrkeys, int nrvalues ); @Override Object clone(); @Override void setDefault(); @Override void getFields( RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); @Override String getXML(); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
      Repository repository, IMetaStore metaStore ); @Override RowMetaInterface getTableFields(); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
      TransMeta transMeta, Trans trans ); @Override StepDataInterface getStepData(); @Override void analyseImpact( List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepinfo,
      RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository,
      IMetaStore metaStore ); @Override DatabaseMeta[] getUsedDatabaseConnections(); boolean isEatingRowOnLookupFailure(); void setEatingRowOnLookupFailure( boolean eatingRowOnLookupFailure ); @Override String getSchemaName(); @Override String getMissingDatabaseConnectionInformationMessage(); void setSchemaName( String schemaName ); @Override boolean supportsErrorHandling(); boolean isLoadingAllDataInCache(); void setLoadingAllDataInCache( boolean loadingAllDataInCache ); @Override RowMeta getRowMeta( StepDataInterface stepData ); @Override List<String> getDatabaseFields(); @Override List<String> getStreamFields(); static final String[] conditionStrings; static final int CONDITION_EQ; static final int CONDITION_NE; static final int CONDITION_LT; static final int CONDITION_LE; static final int CONDITION_GT; static final int CONDITION_GE; static final int CONDITION_LIKE; static final int CONDITION_BETWEEN; static final int CONDITION_IS_NULL; static final int CONDITION_IS_NOT_NULL; }