Package uk.ac.bbsrc.tgac.miso.core.data.impl

Examples of uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryDilution


                          }
                  )
  )
  public LibraryDilution getLibraryDilutionById(long dilutionId) throws IOException {
    List eResults = template.query(LIBRARY_DILUTION_SELECT_BY_DILUTION_ID, new Object[]{dilutionId}, new LibraryDilutionMapper());
    LibraryDilution e = eResults.size() > 0 ? (LibraryDilution) eResults.get(0) : null;
    return e;
  }
View Full Code Here


    return e;
  }

  public LibraryDilution getLibraryDilutionByBarcode(String barcode) throws IOException {
    List eResults = template.query(LIBRARY_DILUTION_SELECT_BY_IDENTIFICATION_BARCODE, new Object[]{barcode}, new LibraryDilutionMapper());
    LibraryDilution e = eResults.size() > 0 ? (LibraryDilution) eResults.get(0) : null;
    return e;
  }
View Full Code Here

    return false;
  }

  public class LazyLibraryDilutionMapper implements RowMapper<LibraryDilution> {
    public LibraryDilution mapRow(ResultSet rs, int rowNum) throws SQLException {
      LibraryDilution libraryDilution = dataObjectFactory.getLibraryDilution();
      libraryDilution.setId(rs.getLong("dilutionId"));
      libraryDilution.setName(rs.getString("name"));
      libraryDilution.setConcentration(rs.getDouble("concentration"));
      libraryDilution.setIdentificationBarcode(rs.getString("identificationBarcode"));
      libraryDilution.setCreationDate(rs.getDate("creationDate"));
      libraryDilution.setDilutionCreator(rs.getString("dilutionUserName"));

      //libraryDilution.setLastUpdated(rs.getTimestamp("lastUpdated"));

      try {
        libraryDilution.setSecurityProfile(securityProfileDAO.get(rs.getLong("securityProfile_profileId")));
        libraryDilution.setLibrary(libraryDAO.lazyGet(rs.getLong("library_libraryId")));
      }
      catch (IOException e) {
        log.error("Cannot map from database to LibraryDilution: ", e);
        e.printStackTrace();
      }
View Full Code Here

      if (!pool.userCanRead(user)) {
        throw new SecurityException("Permission denied.");
      }

      if (dilutionId != null) {
          LibraryDilution ld = requestManager.getLibraryDilutionById(dilutionId);
        if (ld != null) {
          pool.addPoolableElement(ld);
        }
      }
View Full Code Here

  @RequestMapping(value = "/import", method = RequestMethod.POST)
  public String importLibraryDilutionsToPool(HttpServletRequest request, ModelMap model) throws IOException {
    IlluminaPool p = (IlluminaPool)model.get("pool");
    String[] dils = request.getParameterValues("importdilslist");
    for (String s : dils) {
      LibraryDilution ld = requestManager.getLibraryDilutionByBarcode(s);
      if (ld != null) {
        try {
          p.addPoolableElement(ld);
        }
        catch (MalformedDilutionException e) {
View Full Code Here

    return template.query(LIBRARY_DILUTIONS_BY_RELATED_EMPCR_POOL_ID, new Object[]{poolId}, new LibraryDilutionMapper(true));
  }

  @Override
  public LibraryDilution getLibraryDilutionByBarcodeAndPlatform(String barcode, PlatformType platformType) throws IOException {
    LibraryDilution b = getLibraryDilutionByBarcode(barcode);

    if (b != null && b.getLibrary().getPlatformName().equals(platformType.getKey())) {
      return b;
    }
    return null;
  }
View Full Code Here

    }
    return null;
  }

  public LibraryDilution getLibraryDilutionByIdAndPlatform(long dilutionId, PlatformType platformType) throws IOException {
    LibraryDilution b = get(dilutionId);

    if (b != null && b.getLibrary().getPlatformName().equals(platformType.getKey())) {
      return b;
    }
    return null;
  }
View Full Code Here

      }
    )
  )
  public LibraryDilution get(long dilutionId) throws IOException {
    List eResults = template.query(LIBRARY_DILUTION_SELECT_BY_DILUTION_ID, new Object[]{dilutionId}, new LibraryDilutionMapper());
    LibraryDilution e = eResults.size() > 0 ? (LibraryDilution) eResults.get(0) : null;
    return e;
  }
View Full Code Here

    return e;
  }

  public LibraryDilution getLibraryDilutionByBarcode(String barcode) throws IOException {
    List eResults = template.query(LIBRARY_DILUTION_SELECT_BY_IDENTIFICATION_BARCODE, new Object[]{barcode}, new LibraryDilutionMapper());
    LibraryDilution e = eResults.size() > 0 ? (LibraryDilution) eResults.get(0) : null;
    return e;
  }
View Full Code Here

        if ((element = lookupCache(cacheManager).get(DbUtils.hashCodeCacheKeyFor(id))) != null) {
          log.debug("Cache hit on map for LibraryDilution " + id);
          return (LibraryDilution)element.getObjectValue();
        }
      }
      LibraryDilution libraryDilution = dataObjectFactory.getLibraryDilution();
      libraryDilution.setId(id);
      libraryDilution.setName(rs.getString("name"));
      libraryDilution.setConcentration(rs.getDouble("concentration"));
      libraryDilution.setIdentificationBarcode(rs.getString("identificationBarcode"));
      libraryDilution.setCreationDate(rs.getDate("creationDate"));
      libraryDilution.setDilutionCreator(rs.getString("dilutionUserName"));

      //libraryDilution.setLastUpdated(rs.getTimestamp("lastUpdated"));

      try {
        libraryDilution.setSecurityProfile(securityProfileDAO.get(rs.getLong("securityProfile_profileId")));

        if (!isLazy()) {
          libraryDilution.setLibrary(libraryDAO.get(rs.getLong("library_libraryId")));
        }
        else {
          libraryDilution.setLibrary(libraryDAO.lazyGet(rs.getLong("library_libraryId")));
        }
      }
      catch (IOException e1) {
        e1.printStackTrace();
      }
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryDilution

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.