public JdbcWriterCommands newInstance(Destination destination, Connection conn) {
    switch (destination.getType()) {
      case MYSQL:
        return new MySqlWriterCommands(destination.getProperties(), conn);
      case TERADATA:
        return new TeradataWriterCommands(destination.getProperties(), conn);
      case POSTGRES:
        return new PostgresWriterCommands(destination.getProperties(), conn);
      default:
        throw new IllegalArgumentException(destination.getType() + " is not supported");
    }
  }
public JdbcWriterCommands newInstance ( Destination destination , Connection conn ) { switch ( destination . getType ( ) ) { case MYSQL : return new MySqlWriterCommands ( destination . getProperties ( ) , conn ) ; case TERADATA : return new TeradataWriterCommands ( destination . getProperties ( ) , conn ) ; case POSTGRES : return new PostgresWriterCommands ( destination . getProperties ( ) , conn ) ; default : throw new IllegalArgumentException ( destination . getType ( ) + " is not supported" ) ; } }
@param destination
@return Provides JdbcWriterCommands bases on destination.