You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Abraham Elmahrek (JIRA)" <ji...@apache.org> on 2014/11/03 18:27:34 UTC

[jira] [Created] (SQOOP-1658) Sqoop2: Add API documentation to private methods in repository

Abraham Elmahrek created SQOOP-1658:
---------------------------------------

             Summary: Sqoop2: Add API documentation to private methods in repository
                 Key: SQOOP-1658
                 URL: https://issues.apache.org/jira/browse/SQOOP-1658
             Project: Sqoop
          Issue Type: Bug
          Components: sqoop2-framework
    Affects Versions: 1.99.4
            Reporter: Abraham Elmahrek
             Fix For: 2.0.0


Examples:
{code}
  private void insertConnectorDirection(Long connectorId, Direction direction, Connection conn)
      throws SQLException {
    PreparedStatement stmt = null;

    try {
      stmt = conn.prepareStatement(CommonRepositoryInsertUpdateDeleteSelectQuery.STMT_INSERT_SQ_CONNECTOR_DIRECTIONS);
      stmt.setLong(1, connectorId);
      stmt.setLong(2, getDirection(direction, conn));

      if (stmt.executeUpdate() != 1) {
        throw new SqoopException(CommonRepositoryError.COMMON_0043);
      }
    } finally {
      closeStatements(stmt);
    }
  }

  private void insertConnectorDirections(Long connectorId, SupportedDirections directions, Connection conn)
      throws SQLException {
    if (directions.isDirectionSupported(Direction.FROM)) {
      insertConnectorDirection(connectorId, Direction.FROM, conn);
    }

    if (directions.isDirectionSupported(Direction.TO)) {
      insertConnectorDirection(connectorId, Direction.TO, conn);
    }
  }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)