Package com.odb.core.dao.dto

Examples of com.odb.core.dao.dto.DataSourceInfo


  /* (non-Javadoc)
   * @see org.springframework.jdbc.core.ResultSetExtractor#extractData(java.sql.ResultSet)
   */
  public DataSourceInfo extractData(ResultSet rs) throws SQLException,
      DataAccessException {
    DataSourceInfo dsInfo = null;
    if(rs.next()){
      dsInfo = new DataSourceInfo();
      dsInfo.setDataSourceID(rs.getString("DATASOURCE_ID"));
      dsInfo.setDataSourceName(rs.getString("DATASOURCE_NAME"));
      dsInfo.setPublisherID(rs.getString("PUBLISHER_ID"));
      dsInfo.setTimeoutInterval(rs.getLong("TIMEOUT_INTERVAL"));
      dsInfo.setSeriesCount(rs.getInt("NUM_OF_SERIES"));
    }
    return dsInfo;
  }
View Full Code Here


  /* (non-Javadoc)
   * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
   */
  public DataSourceInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
    DataSourceInfo dsInfo = new DataSourceInfo();
    dsInfo.setDataSourceID(rs.getString("DATASOURCE_ID"));
    dsInfo.setDataSourceName(rs.getString("DATASOURCE_NAME"));
    dsInfo.setPublisherID(rs.getString("PUBLISHER_ID"));
    dsInfo.setTimeoutInterval(rs.getLong("TIMEOUT_INTERVAL"));
    dsInfo.setSeriesCount(rs.getInt("NUM_OF_SERIES"));
    return dsInfo;
  }
View Full Code Here

   *             the sQL exception
   */
  @Transactional(propagation = Propagation.MANDATORY)
  public String registerDataSource(DataSourceConfiguration dsConfig) throws SQLException {
    String dsID = dsConfig.getPublisherID() + "_" + System.currentTimeMillis();
    DataSourceInfo dsInfo = new DataSourceInfo();
    dsInfo.setPublisherID(dsConfig.getPublisherID());
    dsInfo.setDataSourceID(dsID);
    dsInfo.setDataSourceName(dsConfig.getDsName());
    dsInfo.setTimeoutInterval(dsConfig.getDsTimeoutInterval());
    dsInfo.setSeriesCount(dsConfig.getSeriesCount());
    odbDAO.addDataSource(dsInfo);

    for (int i = 0; i < dsConfig.getXsInfo().size(); i++) {
      DataSourceAxisInfo dsAxisInfo = new DataSourceAxisInfo();
      dsAxisInfo.setDataSourceID(dsID);
View Full Code Here

   * @throws SQLException
   *             the sQL exception
   */
  public DataSourceConfiguration getDataSourceConfigurationBy(String dsID) throws SQLException {
    DataSourceConfiguration dsConfig = new DataSourceConfiguration();
    DataSourceInfo dsInfo = odbDAO.getDataSourceByDataSourceID(dsID);
    dsConfig.setDsName(dsInfo.getDataSourceName());
    dsConfig.setDsTimeoutInterval(dsInfo.getTimeoutInterval());
    dsConfig.setSeriesCount(dsInfo.getSeriesCount());
    dsConfig.setPublisherID(dsInfo.getPublisherID());
    dsConfig.setDsID(dsID);
    List<DataSourceAxisInfo> dsAxisInfoAll = odbDAO.getDataSourceAxisInfo(dsID);
    List<AxisInfo> xsInfoAll = new ArrayList<AxisInfo>();
    for (int i = 0; i < dsAxisInfoAll.size(); i++) {
      DataSourceAxisInfo dsAxisInfo = dsAxisInfoAll.get(i);
View Full Code Here

TOP

Related Classes of com.odb.core.dao.dto.DataSourceInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.