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

Examples of uk.ac.bbsrc.tgac.miso.core.data.Library


    List<_96WellPlate> plates = new LinkedList<_96WellPlate>();
    for (int p = 1; p < 5; p++) {
      _96WellPlate plate = new _96WellPlate();

      for (int i = 1; i < 97; i++) {
        Library l = new LibraryImpl();
        l.setAlias("P"+p+"_L"+i+"_TestLib");
        plate.addElement(l);
      }
      plates.add(plate);
    }
View Full Code Here


  }

  @Test
  public void testLibraryNaming() throws MisoNamingException {
    //DefaultEntityNamingScheme<Library> entityNameValidationScheme = new DefaultEntityNamingScheme(Library.class);
    Library l = dataObjectFactory.getLibrary();
    l.setId(1L);
    String name = libraryNamingScheme.generateNameFor("name", l);
    l.setName(name);
    Assert.assertTrue(libraryNamingScheme.validateField("name", l.getName()));

    l.setAlias("RD_L1-1_Foo.bar");
    Assert.assertTrue(libraryNamingScheme.validateField("alias", l.getAlias()));

    log.info("Library naming scheme valid");
  }
View Full Code Here

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

      try {
        libraryDilution.setSecurityProfile(securityProfileDAO.get(rs.getLong("securityProfile_profileId")));
        Library library = libraryDAO.get(rs.getLong("library_libraryId"));
        libraryDilution.setLibrary(library);
      }
      catch (IOException e1) {
        e1.printStackTrace();
      }
View Full Code Here

      NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(template);
      namedTemplate.update(LIBRARY_QC_UPDATE, params);
    }

    if (this.cascadeType != null) {
      Library l = libraryQC.getLibrary();
      if (this.cascadeType.equals(CascadeType.PERSIST)) {
        if (l != null) libraryDAO.save(l);
      }
      else if (this.cascadeType.equals(CascadeType.REMOVE)) {
        if (l != null) {
View Full Code Here

  public boolean remove(LibraryQC qc) throws IOException {
    NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(template);
    if (qc.isDeletable() &&
           (namedTemplate.update(LIBRARY_QC_DELETE,
                                 new MapSqlParameterSource().addValue("qcId", qc.getId())) == 1)) {
      Library l = qc.getLibrary();
      if (this.cascadeType.equals(CascadeType.PERSIST)) {
        if (l != null) libraryDAO.save(l);
      }
      else if (this.cascadeType.equals(CascadeType.REMOVE)) {
        if (l != null) {
View Full Code Here

      namedTemplate.update(LIBRARY_DILUTION_UPDATE, params);
      */
    }

    if (this.cascadeType != null) {
      Library l = dilution.getLibrary();
      if(this.cascadeType.equals(CascadeType.PERSIST)) {
        if (l != null) libraryDAO.save(l);
      }
      else if (this.cascadeType.equals(CascadeType.REMOVE)) {
        if (l != null) {
          Cache pc = cacheManager.getCache("libraryCache");
          pc.remove(DbUtils.hashCodeCacheKeyFor(l.getId()));
        }
      }
    }

    return dilution.getId();
View Full Code Here

  public boolean removeLibraryDilution(LibraryDilution d) throws IOException {
    NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(template);
    if (d.isDeletable() &&
           (namedTemplate.update(LIBRARY_DILUTION_DELETE,
                                 new MapSqlParameterSource().addValue("dilutionId", d.getId())) == 1)) {
      Library l = d.getLibrary();
      if(this.cascadeType.equals(CascadeType.PERSIST)) {
        if (l != null) libraryDAO.save(l);
      }
      else if (this.cascadeType.equals(CascadeType.REMOVE)) {
        if (l != null) {
          Cache pc = cacheManager.getCache("libraryCache");
          pc.remove(DbUtils.hashCodeCacheKeyFor(l.getId()));
        }
      }
      return true;
    }
    return false;
View Full Code Here

      namedTemplate.update(LIBRARY_DILUTION_UPDATE, params);
      */
    }

    if (this.cascadeType != null) {
      Library l = dilution.getLibrary();
      if(this.cascadeType.equals(CascadeType.PERSIST)) {
        if (l != null) libraryDAO.save(l);
      }
      else if (this.cascadeType.equals(CascadeType.REMOVE)) {
        if (l != null) {
View Full Code Here

  public boolean remove(LibraryDilution d) throws IOException {
    NamedParameterJdbcTemplate namedTemplate = new NamedParameterJdbcTemplate(template);
    if (d.isDeletable() &&
           (namedTemplate.update(LIBRARY_DILUTION_DELETE,
                                 new MapSqlParameterSource().addValue("dilutionId", d.getId())) == 1)) {
      Library l = d.getLibrary();
      if(this.cascadeType.equals(CascadeType.PERSIST)) {
        if (l != null) libraryDAO.save(l);
      }
      else if (this.cascadeType.equals(CascadeType.REMOVE)) {
        if (l != null) {
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.data.Library

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.