Changeset 5060


Ignore:
Timestamp:
Aug 19, 2009, 9:02:11 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #108: Logging the change history of an item

  • Documented the change made in [5058]
  • Changed calls to DbControl?.reattachItem() from all core code and jsp scripts
Location:
trunk
Files:
125 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/appendix/incompatible.xml

    r5027 r5060  
    9999      org.hibernate.SessionException: proxies cannot be fetched by a stateless session
    100100      </code>
     101    </para>
     102
     103    <bridgehead>
     104      Re-attaching a detached item no longer assumes that it has been modified
     105    </bridgehead>
     106   
     107    <para>
     108      The <code>DbControl.reattachItem(BasicItem)</code> method has been deprected
     109      and replaced with <code>DbControl.reattachItem(BasicItem, boolean)</code>.
     110      The boolean parameter is used to tell BASE if the item has been modified
     111      or not while it was detached from the session. The previous behaviour of
     112      <code>DbControl.reattachItem(BasicItem)</code> was equivalent to
     113      <code>DbControl.reattachItem(BasicItem, true)</code>, but this is now
     114      changed to <code>DbControl.reattachItem(BasicItem, false)</code> since
     115      in most cases there are really no changes to the item. The problem with
     116      the old behaviour was seen in the new (in BASE 2.13) change history
     117      functionality which would create UPDATE events even when there was no
     118      change.
    101119    </para>
    102120
  • trunk/src/clients/jobagent/net/sf/basedb/clients/jobagent/executors/DummyJobExecutor.java

    r4512 r5060  
    123123        }
    124124        dc  = sc.newDbControl();
    125         dc.reattachItem(job);
     125        dc.reattachItem(job, false);
    126126      }
    127127      if (aborted)
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/SharedItemTransfer.java

    r4889 r5060  
    109109  @param worldAccess <code>int</code> Base 1 worldAccess value
    110110   */
     111  @SuppressWarnings("deprecation")
    111112  protected void chmod(DbControl dc, SharedItem item, int groupId,
    112113      int groupAccess, int worldAccess)
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/WellTransfer.java

    r4889 r5060  
    108108  }
    109109
     110  @SuppressWarnings("deprecation")
    110111  private void annotateWellsForEachPlate()
    111112  {
  • trunk/src/clients/web/net/sf/basedb/clients/web/Base.java

    r5053 r5060  
    13001300        // reattached to the current session
    13011301        Protocol p = newItem.getProtocol();
    1302         if (p != null) dc.reattachItem(p);
     1302        if (p != null) dc.reattachItem(p, false);
    13031303      }
    13041304      for (int i = 0; i < modifiedAnnotations.length; ++i)
  • trunk/src/core/net/sf/basedb/core/DbControl.java

    r5058 r5060  
    994994    Reattach a detached item assuming that it has not been
    995995    updated while it was detached.
    996     @see #reattachItem(BasicItem, boolean)
     996    @deprecated Use {@link #reattachItem(BasicItem, boolean)} instead
    997997  */
    998998  public void reattachItem(BasicItem item)
     
    10121012      only be saved to the database if it is modified after the
    10131013      reattachement
     1014    @return The reattached item
    10141015    @throws PermissionDeniedException If the logged in user doesn't have
    10151016      read/write permission
     
    10181019    @since 2.13
    10191020  */
    1020   public void reattachItem(BasicItem item, boolean updated)
     1021  public <T extends BasicItem> T reattachItem(T item, boolean updated)
    10211022    throws PermissionDeniedException, ItemNotFoundException, BaseException
    10221023  {
     
    10551056      }
    10561057    }
     1058    return item;
    10571059  }
    10581060 
  • trunk/src/core/net/sf/basedb/core/MultiPermissions.java

    r4889 r5060  
    527527    {
    528528      item.checkPermission(Permission.SET_PERMISSION);
    529       dc.reattachItem(item);
     529      dc.reattachItem(item, false);
    530530      item.setItemKey(newItemKeys.get(item.getItemKey()));
    531531      item.setProjectKey(newProjectKeys.get(item.getProjectKey()));
  • trunk/src/core/net/sf/basedb/core/ShareableUtil.java

    r4889 r5060  
    174174   
    175175    BasicItem fromItem = (BasicItem)from;
    176     if (fromItem.isDetached()) dc.reattachItem(fromItem);
     176    if (fromItem.isDetached()) dc.reattachItem(fromItem, false);
    177177   
    178178    ItemKey itemKey = from.getItemKey();
  • trunk/src/core/net/sf/basedb/core/plugin/AbstractAnalysisPlugin.java

    r4516 r5060  
    391391      for (BioAssay ba : bioAssaySubset)
    392392      {
    393         dc.reattachItem(ba);
     393        dc.reattachItem(ba, false);
    394394      }
    395395    }
  • trunk/src/plugins/core/net/sf/basedb/plugins/IntensityCalculatorPlugin.java

    r4998 r5060  
    214214      for (RawBioAssay rba : sources)
    215215      {
    216         dc.reattachItem(rba);
     216        dc.reattachItem(rba, false);
    217217      }
    218218
  • trunk/src/plugins/core/net/sf/basedb/plugins/PackedFileExporter.java

    r4776 r5060  
    282282          for (Nameable item : selectedFilesAndDirs)
    283283          {
    284             dc.reattachItem((BasicItem)item);
     284            dc.reattachItem((BasicItem)item, false);
    285285            Directory dir = null;
    286286            if (item.getType() == Item.FILE)
  • trunk/src/plugins/core/net/sf/basedb/plugins/PlateFlatFileImporter.java

    r4985 r5060  
    381381    dc = sc.newDbControl();
    382382    plates = new HashMap<String, Plate>();
    383     plateType = (PlateType)job.getValue("plateType");
    384     dc.reattachItem(plateType);
     383    plateType = dc.reattachItem((PlateType)job.getValue("plateType"), false);
    385384    plateNamePrefix = (String)job.getValue("plateNamePrefix");
    386385    if (plateNamePrefix == null) plateNamePrefix = "";
  • trunk/src/test/TestAnalyzePluginUtil.java

    r4979 r5060  
    122122        dc.commit();
    123123        dc = TestUtil.getDbControl();
    124         dc.reattachItem(e);
     124        dc.reattachItem(e, false);
    125125        e.addRawBioAssay(rba);
    126126      }
  • trunk/src/test/TestAnnotation.java

    r4889 r5060  
    147147      id = a.getId();
    148148      dc = TestUtil.getDbControl();
    149       dc.reattachItem(a);
     149      dc.reattachItem(a, false);
    150150      write_item(0, a);
    151151      write("--Create annotation OK");
  • trunk/src/test/TestAnnotationType.java

    r4889 r5060  
    151151      dc.commit();
    152152      dc = TestUtil.getDbControl();
    153       dc.reattachItem(at);
     153      dc.reattachItem(at, false);
    154154      id = at.getId();
    155155      write_item(0, at);
  • trunk/src/test/TestAnnotationTypeCategory.java

    r4544 r5060  
    9090      dc.commit();
    9191      dc=TestUtil.getDbControl();
    92       dc.reattachItem(atgc);
     92      dc.reattachItem(atgc, false);
    9393      id=atgc.getId();
    9494      write_item(id, atgc);
  • trunk/src/test/TestAnyToAny.java

    r5024 r5060  
    102102      id = a.getId();
    103103      dc = TestUtil.getDbControl();
    104       dc.reattachItem(a);
     104      dc.reattachItem(a, false);
    105105      write_item(0, a);
    106106      write("--Create any-to-any OK");
  • trunk/src/test/TestArrayBatch.java

    r4889 r5060  
    169169      id = ab.getId();
    170170      dc = TestUtil.getDbControl();
    171       dc.reattachItem(ab);
     171      dc.reattachItem(ab, false);
    172172      write_item(0, ab);
    173173      write("--Create array batch OK");
  • trunk/src/test/TestArrayDesign.java

    r5026 r5060  
    151151      id = ad.getId();
    152152      dc = TestUtil.getDbControl();
    153       dc.reattachItem(ad);
     153      dc.reattachItem(ad, false);
    154154      write_item(0, ad);
    155155      write("--Create array design OK");
  • trunk/src/test/TestArraySlide.java

    r4889 r5060  
    8989      id = as.getId();
    9090      dc = TestUtil.getDbControl();
    91       dc.reattachItem(as);
     91      dc.reattachItem(as, false);
    9292      write_item(0, as);
    9393      write("--Create array slide OK");
  • trunk/src/test/TestBioAsssaySetExporter.java

    r4931 r5060  
    269269      id = rba.getId();
    270270      dc = TestUtil.getDbControl();
    271       dc.reattachItem(rba);
     271      dc.reattachItem(rba, false);
    272272      write("--Create raw bioassay OK");
    273273    }
  • trunk/src/test/TestBioPlate.java

    r4732 r5060  
    215215      id = bp.getId();
    216216      dc = TestUtil.getDbControl();
    217       dc.reattachItem(bp);
     217      dc.reattachItem(bp, false);
    218218      write_item(0, bp);
    219219      write("--Create bioplate OK");
  • trunk/src/test/TestClientDefaultSetting.java

    r4889 r5060  
    7171      id = cds.getId();
    7272      dc = TestUtil.getDbControl();
    73       dc.reattachItem(cds);
     73      dc.reattachItem(cds, false);
    7474      write_item(0, cds);
    7575      write("--Create client default setting OK");
  • trunk/src/test/TestDirectory.java

    r4889 r5060  
    9595      id = d.getId();
    9696      dc = TestUtil.getDbControl();
    97       dc.reattachItem(d);
     97      dc.reattachItem(d, false);
    9898      write_item(0, d);
    9999      write("--Create directory OK");
     
    128128      id = sub.getId();
    129129      dc = TestUtil.getDbControl();
    130       dc.reattachItem(sub);
     130      dc.reattachItem(sub, false);
    131131      write_item(0, sub);
    132132      write("--Create subdirectory OK");
  • trunk/src/test/TestExperiment.java

    r4980 r5060  
    182182      id = e.getId();
    183183      dc = TestUtil.getDbControl();
    184       dc.reattachItem(e);
     184      dc.reattachItem(e, false);
    185185      write_item(0, e);
    186186      write("--Create experiment OK");
     
    643643      id = root.getId();
    644644      dc = TestUtil.getDbControl();
    645       dc.reattachItem(root);
     645      dc.reattachItem(root, false);
    646646      write_item(0, root);
    647647      write("--Create root bioassayset using calculator OK ("+numSpots+" spots inserted; "+time+" ms)");
     
    693693      id = root.getId();
    694694      dc = TestUtil.getDbControl();
    695       dc.reattachItem(root);
     695      dc.reattachItem(root, false);
    696696      write_item(0, root);
    697697      write("--Create root bioassayset using query OK ("+numSpots+" spots inserted; "+time+" ms)");
     
    744744      id = root.getId();
    745745      dc = TestUtil.getDbControl();
    746       dc.reattachItem(root);
     746      dc.reattachItem(root, false);
    747747      write_item(0, root);
    748748      write("--Create empty root bioassayset OK ("+numSpots+" spots inserted)");
     
    836836      id = bas.getId();
    837837      dc = TestUtil.getDbControl();
    838       dc.reattachItem(bas);
     838      dc.reattachItem(bas, false);
    839839      write_item(0, bas);
    840840      write("--Create file bioassayset OK ("+bas.getNumFileSpots()+" spots inserted)");
     
    917917      id = bas.getId();
    918918      dc = TestUtil.getDbControl();
    919       dc.reattachItem(bas);
     919      dc.reattachItem(bas, false);
    920920      write_item(0, bas);
    921921      write("--Create bioassayset OK ("+numSpots+" spots inserted)");
     
    982982      id = bas.getId();
    983983      dc = TestUtil.getDbControl();
    984       dc.reattachItem(bas);
     984      dc.reattachItem(bas, false);
    985985      write_item(0, bas);
    986986      write("--Create filtered bioassayset OK ("+numSpots+" spots inserted)");
     
    10741074      id = insertTo.getId();
    10751075      dc = TestUtil.getDbControl();
    1076       dc.reattachItem(insertTo);
     1076      dc.reattachItem(insertTo, false);
    10771077      write_item(0, insertTo);
    10781078      write("--Calculate spot extra values OK ("+numSpots+" values inserted)");
     
    11701170      id = bas.getId();
    11711171      dc = TestUtil.getDbControl();
    1172       dc.reattachItem(bas);
     1172      dc.reattachItem(bas, false);
    11731173      write_item(0, bas);
    11741174      write("--Calculate position extra values OK ("+numSpots+" values inserted)");
  • trunk/src/test/TestExtraValueType.java

    r4889 r5060  
    7777      id = evt.getId();
    7878      dc = TestUtil.getDbControl();
    79       dc.reattachItem(evt);
     79      dc.reattachItem(evt, false);
    8080      write_item(0, evt);
    8181      write("--Create extra value type OK");
  • trunk/src/test/TestExtract.java

    r4889 r5060  
    100100      id = e.getId();
    101101      dc = TestUtil.getDbControl();
    102       dc.reattachItem(e);
     102      dc.reattachItem(e, false);
    103103      write_item(0, e);
    104104      write("--Create extract OK");
     
    142142      id = e.getId();
    143143      dc = TestUtil.getDbControl();
    144       dc.reattachItem(e);
     144      dc.reattachItem(e, false);
    145145      write_item(0, e);
    146146      write("--Create pooled extract OK");
     
    324324      eventId = bme.getId();
    325325      dc = TestUtil.getDbControl();
    326       dc.reattachItem(bme);
     326      dc.reattachItem(bme, false);
    327327      write_item(0, bme, e);
    328328      write("--Add event for extract OK");
  • trunk/src/test/TestFile.java

    r4889 r5060  
    116116      id = file.getId();
    117117      dc = TestUtil.getDbControl();
    118       dc.reattachItem(file);
     118      dc.reattachItem(file, false);
    119119      write_item(0, file);
    120120      write("--Create file OK");
     
    293293      dc.commit();
    294294      dc = TestUtil.getDbControl();
    295       dc.reattachItem(file);
     295      dc.reattachItem(file, false);
    296296      write_item(0, file);
    297297      write("--Update file OK");
  • trunk/src/test/TestHardware.java

    r4889 r5060  
    8686      id = hw.getId();
    8787      dc = TestUtil.getDbControl();
    88       dc.reattachItem(hw);
     88      dc.reattachItem(hw, false);
    8989      write_item(0, hw);
    9090      write("--Create hardware OK");
  • trunk/src/test/TestHelp.java

    r4889 r5060  
    8686      id = h.getId();
    8787      dc = TestUtil.getDbControl();
    88       dc.reattachItem(h);
     88      dc.reattachItem(h, false);
    8989      write_item(0, h);
    9090      write("--Create help OK");
  • trunk/src/test/TestHybridization.java

    r4889 r5060  
    110110      id = h.getId();
    111111      dc = TestUtil.getDbControl();
    112       dc.reattachItem(h);
    113       dc.reattachItem(h.getCreationEvent());
     112      dc.reattachItem(h, false);
     113      dc.reattachItem(h.getCreationEvent(), false);
    114114      write_item(0, h);
    115115      write("--Create hybridization OK");
  • trunk/src/test/TestJob.java

    r4930 r5060  
    200200      id = job.getId();
    201201      dc = TestUtil.getDbControl();
    202       dc.reattachItem(job);
     202      dc.reattachItem(job, false);
    203203      write_item(0, job);
    204204      write("--Create job OK");
  • trunk/src/test/TestJobAgent.java

    r4514 r5060  
    267267      dc.commit();
    268268      dc = TestUtil.getDbControl();
    269       dc.reattachItem(settings);
     269      dc.reattachItem(settings, false);
    270270      write_item(0, settings);
    271271      write("--Create settings for job agent OK");
     
    356356      id = job.getId();
    357357      dc = TestUtil.getDbControl();
    358       dc.reattachItem(job);
     358      dc.reattachItem(job, false);
    359359      write_item(0, job, JobAgent.getById(dc, agentId).getSettings(plugin, true));
    360360      write("--Create job OK");
  • trunk/src/test/TestLabeledExtract.java

    r4889 r5060  
    103103      id = le.getId();
    104104      dc = TestUtil.getDbControl();
    105       dc.reattachItem(le);
     105      dc.reattachItem(le, false);
    106106      write_item(0, le);
    107107      write("--Create labeled extract OK");
     
    146146      id = le.getId();
    147147      dc = TestUtil.getDbControl();
    148       dc.reattachItem(le);
     148      dc.reattachItem(le, false);
    149149      write_item(0, le);
    150150      write("--Create pooled labeled extract OK");
     
    332332      eventId = bme.getId();
    333333      dc = TestUtil.getDbControl();
    334       dc.reattachItem(bme);
     334      dc.reattachItem(bme, false);
    335335      write_item(0, bme, le);
    336336      write("--Add event for labeled extract OK");
  • trunk/src/test/TestPlate.java

    r4889 r5060  
    121121      id = p.getId();
    122122      dc = TestUtil.getDbControl();
    123       dc.reattachItem(p);
     123      dc.reattachItem(p, false);
    124124      write_item(0, p);
    125125      write("--Create plate OK");
     
    345345      id = pe.getId();
    346346      dc = TestUtil.getDbControl();
    347       dc.reattachItem(pe);
     347      dc.reattachItem(pe, false);
    348348      write_item(0, pe);
    349349      write("--Create event OK");
  • trunk/src/test/TestPlateMapping.java

    r4889 r5060  
    118118      id = pm.getId();
    119119      dc = TestUtil.getDbControl();
    120       dc.reattachItem(pm);
     120      dc.reattachItem(pm, false);
    121121      write_item(0, pm);
    122122      write("--Create plate mapping OK");
     
    262262      id = p.getId();
    263263      dc = TestUtil.getDbControl();
    264       dc.reattachItem(p);
     264      dc.reattachItem(p, false);
    265265      TestPlate.write_item(0, p);
    266266      write("--Apply plate mapping OK");
  • trunk/src/test/TestPlateType.java

    r4889 r5060  
    8484      id = pt.getId();
    8585      dc = TestUtil.getDbControl();
    86       dc.reattachItem(pt);
     86      dc.reattachItem(pt, false);
    8787      write_item(0, pt);
    8888      write("--Create plate type OK");
     
    222222      id = pet.getId();
    223223      dc = TestUtil.getDbControl();
    224       dc.reattachItem(pet);
     224      dc.reattachItem(pet, false);
    225225      write_item(0, pet);
    226226      write("--Create event type OK");
  • trunk/src/test/TestPlatform.java

    r4514 r5060  
    317317      id = v.getId();
    318318      dc = TestUtil.getDbControl();
    319       dc.reattachItem(v);
     319      dc.reattachItem(v, false);
    320320      write_item(0, v);
    321321      write("--Create platform variant OK");
  • trunk/src/test/TestPluginConfiguration.java

    r4889 r5060  
    8585      id = pc.getId();
    8686      dc = TestUtil.getDbControl();
    87       dc.reattachItem(pc);
     87      dc.reattachItem(pc, false);
    8888      write_item(0, pc);
    8989      write("--Create plugin configuration OK");
     
    205205
    206206      dc = TestUtil.getDbControl();
    207       dc.reattachItem(pc);
     207      dc.reattachItem(pc, false);
    208208     
    209209      List<?> value = pc.getParameterValues("oneString");
  • trunk/src/test/TestPluginType.java

    r4889 r5060  
    7373      id = pt.getId();
    7474      dc = TestUtil.getDbControl();
    75       dc.reattachItem(pt);
     75      dc.reattachItem(pt, false);
    7676      write_item(0, pt);
    7777      write("--Create plugin type OK");
  • trunk/src/test/TestProtocol.java

    r4889 r5060  
    8989      id = p.getId();
    9090      dc = TestUtil.getDbControl();
    91       dc.reattachItem(p);
     91      dc.reattachItem(p, false);
    9292      write_item(0, p);
    9393      write("--Create protocol OK");
     
    208208      dc.commit();
    209209      dc = TestUtil.getDbControl();
    210       dc.reattachItem(p);
     210      dc.reattachItem(p, false);
    211211      write_item(0, p);
    212212      write("--Deattach file OK");
     
    237237      dc.commit();
    238238      dc = TestUtil.getDbControl();
    239       dc.reattachItem(p);
     239      dc.reattachItem(p, false);
    240240      write_item(0, p);
    241241      write("--Attach file OK");
  • trunk/src/test/TestRawBioAssay.java

    r5026 r5060  
    149149      id = rba.getId();
    150150      dc = TestUtil.getDbControl();
    151       dc.reattachItem(rba);
     151      dc.reattachItem(rba, false);
    152152      write_item(0, rba);
    153153      write("--Create raw bioassay OK");
  • trunk/src/test/TestSample.java

    r4889 r5060  
    105105      id = s.getId();
    106106      dc = TestUtil.getDbControl();
    107       dc.reattachItem(s);
     107      dc.reattachItem(s, false);
    108108      write_item(0, s);
    109109      write("--Create sample OK");
     
    147147      id = s.getId();
    148148      dc = TestUtil.getDbControl();
    149       dc.reattachItem(s);
     149      dc.reattachItem(s, false);
    150150      write_item(0, s);
    151151      write("--Create pooled sample OK");
     
    328328      eventId = bme.getId();
    329329      dc = TestUtil.getDbControl();
    330       dc.reattachItem(bme);
     330      dc.reattachItem(bme, false);
    331331      write_item(0, bme, s);
    332332      write("--Add event for sample OK");
  • trunk/src/test/TestScan.java

    r4889 r5060  
    9393      id = s.getId();
    9494      dc = TestUtil.getDbControl();
    95       dc.reattachItem(s);
     95      dc.reattachItem(s, false);
    9696      write_item(0, s);
    9797      write("--Create scan OK");
     
    257257      dc.commit();
    258258      dc = TestUtil.getDbControl();
    259       dc.reattachItem(img);
     259      dc.reattachItem(img, false);
    260260      write_item(0, img);
    261261      write("--Add image to scan OK");
  • trunk/src/test/TestSoftware.java

    r4889 r5060  
    8585      id = sw.getId();
    8686      dc = TestUtil.getDbControl();
    87       dc.reattachItem(sw);
     87      dc.reattachItem(sw, false);
    8888      write_item(0, sw);
    8989      write("--Create software OK");
  • trunk/src/test/TestUnit.java

    r4555 r5060  
    104104      id = u.getId();
    105105      dc = TestUtil.getDbControl();
    106       dc.reattachItem(u);
     106      dc.reattachItem(u, false);
    107107      write_item(0, u);
    108108      write("--Create unit OK");
  • trunk/src/test/TestUserClientSetting.java

    r4889 r5060  
    7474      id = ucs.getId();
    7575      dc = TestUtil.getDbControl();
    76       dc.reattachItem(ucs);
     76      dc.reattachItem(ucs, false);
    7777      write_item(0, ucs);
    7878      write("--Create user client setting OK");
  • trunk/src/test/TestUserDefaultSetting.java

    r4889 r5060  
    7171      id = uds.getId();
    7272      dc = TestUtil.getDbControl();
    73       dc.reattachItem(uds);
     73      dc.reattachItem(uds, false);
    7474      write_item(0, uds);
    7575      write("--Create user default setting OK");
  • trunk/src/test/net/sf/basedb/test/merge/MergeTest.java

    r4915 r5060  
    198198  {
    199199    TestUtil.write("--Creating features for array design: " + design.getName() + "\n");
    200     dc.reattachItem(design);
     200    dc.reattachItem(design, false);
    201201    FeatureBatcher batcher = design.getFeatureBatcher(FeatureIdentificationMethod.COORDINATES, null);
    202202    ReporterBatcher reporterBatcher = ReporterBatcher.getNew(dc);
     
    235235  {
    236236    TestUtil.write("--Creating data for raw bioassay: " + rba.getName() + "\n");
    237     dc.reattachItem(rba);
     237    dc.reattachItem(rba, false);
    238238    RawDataBatcher batcher = rba.getRawDataBatcher(null, null);
    239239    for (int block = 1; block <= 10; block++)
  • trunk/src/test/net/sf/basedb/test/performance/RawDataTest.java

    r4806 r5060  
    133133      // Add raw bioassays to experiment
    134134      dc = TestUtil.getDbControl();
    135       dc.reattachItem(experiment);
     135      dc.reattachItem(experiment, false);
    136136      for (int i = 0; i < numIterations; i++)
    137137      {
  • trunk/www/admin/annotationtypecategories/index.jsp

    r4907 r5060  
    161161    else
    162162    {
    163       dc.reattachItem(annotationTypeCategory);
     163      dc.reattachItem(annotationTypeCategory, false);
    164164      message = "Annotation type category updated";
    165165    }
  • trunk/www/admin/annotationtypes/index.jsp

    r4907 r5060  
    168168    else
    169169    {
    170       dc.reattachItem(annotationType);
     170      dc.reattachItem(annotationType, false);
    171171      message = "Annotation type updated";
    172172    }
  • trunk/www/admin/clients/help/index.jsp

    r4889 r5060  
    130130    else
    131131    {
    132       dc.reattachItem(help);
     132      dc.reattachItem(help, false);
    133133      help.setExternalId(externalId);
    134134      message = "Help updated";
  • trunk/www/admin/clients/index.jsp

    r4889 r5060  
    135135    else
    136136    {
    137       dc.reattachItem(client);
     137      dc.reattachItem(client, false);
    138138      client.setExternalId(Values.getStringOrNull(request.getParameter("external_id")));
    139139      message = "Client application updated";
  • trunk/www/admin/datafiletypes/index.jsp

    r4711 r5060  
    137137    else
    138138    {
    139       dc.reattachItem(fileType);
     139      dc.reattachItem(fileType, false);
    140140      message = "Data file type updated";
    141141    }
  • trunk/www/admin/extravaluetypes/index.jsp

    r4510 r5060  
    136136    else
    137137    {
    138       dc.reattachItem(extraValueType);
     138      dc.reattachItem(extraValueType, false);
    139139      message = "Extra value type updated";
    140140    }
  • trunk/www/admin/filetypes/index.jsp

    r4889 r5060  
    113113    dc = sc.newDbControl();
    114114    FileType fileType = (FileType)cc.getObject("item");
    115     dc.reattachItem(fileType);
     115    dc.reattachItem(fileType, false);
    116116    message = "File type updated";
    117117    fileType.setName(Values.getStringOrNull(request.getParameter("name")));
  • trunk/www/admin/groups/index.jsp

    r4906 r5060  
    167167    else
    168168    {
    169       dc.reattachItem(group);
     169      dc.reattachItem(group, false);
    170170      message = "Group updated";
    171171    }
  • trunk/www/admin/hardware/index.jsp

    r4889 r5060  
    138138    else
    139139    {
    140       dc.reattachItem(hardware);
     140      dc.reattachItem(hardware, false);
    141141      message = "Hardware updated";
    142142    }
  • trunk/www/admin/hardwaretypes/index.jsp

    r4907 r5060  
    154154    else
    155155    {
    156       dc.reattachItem(hardwareType);
     156      dc.reattachItem(hardwareType, false);
    157157      message = "Hardware type updated";
    158158    }
  • trunk/www/admin/jobagents/index.jsp

    r4587 r5060  
    137137    else
    138138    {
    139       dc.reattachItem(agent);
     139      dc.reattachItem(agent, false);
    140140      agent.setExternalId(Values.getStringOrNull(request.getParameter("external_id")));
    141141      message = "Job agent updated";
     
    176176        else
    177177        {
    178           dc.reattachItem(settings);
     178          dc.reattachItem(settings, false);
    179179        }
    180180        settings.setJarPath(Values.getStringOrNull(request.getParameter("jarPath."+pluginId)));
  • trunk/www/admin/mimetypes/index.jsp

    r4889 r5060  
    134134    else
    135135    {
    136       dc.reattachItem(mimeType);
     136      dc.reattachItem(mimeType, false);
    137137      message = "MIME type updated";
    138138    }
  • trunk/www/admin/news/index.jsp

    r4889 r5060  
    143143      news.setStartDate(startDate);
    144144      news.setNewsDate(newsDate);
    145       dc.reattachItem(news);
     145      dc.reattachItem(news, false);
    146146      message = "News updated";
    147147    }
  • trunk/www/admin/platforms/index.jsp

    r4906 r5060  
    168168    else
    169169    {
    170       dc.reattachItem(platform);
     170      dc.reattachItem(platform, false);
    171171      message = "Platform updated";
    172172    }
  • trunk/www/admin/platforms/variants/index.jsp

    r4510 r5060  
    148148    else
    149149    {
    150       dc.reattachItem(variant);
     150      dc.reattachItem(variant, false);
    151151      platform = Platform.getById(dc, variant.getPlatform().getId());
    152152      message = "Platform variant updated";
  • trunk/www/admin/pluginconfigurations/index.jsp

    r4889 r5060  
    165165    else
    166166    {
    167       dc.reattachItem(configuration);
     167      dc.reattachItem(configuration, false);
    168168      message = "Configuration updated";
    169169    }
  • trunk/www/admin/plugindefinitions/index.jsp

    r4936 r5060  
    310310    else
    311311    {
    312       dc.reattachItem(plugin);
     312      dc.reattachItem(plugin, false);
    313313      plugin.loadPluginInformation(jarPath, className, usePermissions == 2);
    314314      message = "Plugin updated";
     
    361361        else
    362362        {
    363           dc.reattachItem(settings);
     363          dc.reattachItem(settings, false);
    364364        }
    365365        settings.setJarPath(Values.getStringOrNull(request.getParameter("jarPath."+agentId)));
  • trunk/www/admin/plugintypes/index.jsp

    r4906 r5060  
    157157    else
    158158    {
    159       dc.reattachItem(pluginType);
     159      dc.reattachItem(pluginType, false);
    160160      pluginType.loadInterfaceInformation(jarPath, interfaceName);
    161161      message = "Plugin type updated";
  • trunk/www/admin/protocols/index.jsp

    r4938 r5060  
    140140    else
    141141    {
    142       dc.reattachItem(protocol);
     142      dc.reattachItem(protocol, false);
    143143      message = "Protocol updated";
    144144    }
  • trunk/www/admin/protocoltypes/index.jsp

    r4906 r5060  
    154154    else
    155155    {
    156       dc.reattachItem(protocolType);
     156      dc.reattachItem(protocolType, false);
    157157      message = "Protocol type updated";
    158158    }
  • trunk/www/admin/quantities/index.jsp

    r4907 r5060  
    154154    else
    155155    {
    156       dc.reattachItem(quantity);
     156      dc.reattachItem(quantity, false);
    157157      message = "Quantity updated";
    158158    }
  • trunk/www/admin/quantities/units/index.jsp

    r4889 r5060  
    129129    else
    130130    {
    131       dc.reattachItem(unit);
     131      dc.reattachItem(unit, false);
    132132      unit.setDisplaySymbol(displaySymbol);
    133133      message = "Unit updated";
  • trunk/www/admin/quota/index.jsp

    r4889 r5060  
    135135    else
    136136    {
    137       dc.reattachItem(quota);
     137      dc.reattachItem(quota, false);
    138138      message = "Quota updated";
    139139    }
  • trunk/www/admin/quotatypes/index.jsp

    r4889 r5060  
    113113    dc = sc.newDbControl();
    114114    QuotaType quotaType = (QuotaType)cc.getObject("item");
    115     dc.reattachItem(quotaType);
     115    dc.reattachItem(quotaType, false);
    116116    message = "Quota type updated";
    117117    quotaType.setName(Values.getStringOrNull(request.getParameter("name")));
  • trunk/www/admin/reportertypes/index.jsp

    r4889 r5060  
    132132    else
    133133    {
    134       dc.reattachItem(reporterType);
     134      dc.reattachItem(reporterType, false);
    135135      message = "Reporter type updated";
    136136    }
  • trunk/www/admin/roles/index.jsp

    r4906 r5060  
    158158    else
    159159    {
    160       dc.reattachItem(role);
     160      dc.reattachItem(role, false);
    161161      message = "Role updated";
    162162    }
  • trunk/www/admin/software/index.jsp

    r4889 r5060  
    138138    else
    139139    {
    140       dc.reattachItem(software);
     140      dc.reattachItem(software, false);
    141141      message = "Software updated";
    142142    }
  • trunk/www/admin/softwaretypes/index.jsp

    r4907 r5060  
    135135    dc = sc.newDbControl();
    136136    SoftwareType softwareType = (SoftwareType)cc.getObject("item");
    137     dc.reattachItem(softwareType);
     137    dc.reattachItem(softwareType, false);
    138138    message = "Software type updated";
    139139    softwareType.setName(Values.getStringOrNull(request.getParameter("name")));
  • trunk/www/admin/users/index.jsp

    r4906 r5060  
    190190    else
    191191    {
    192       dc.reattachItem(user);
     192      dc.reattachItem(user, false);
    193193      oldLogin = user.getLogin();
    194194      user.setLogin(login);
  • trunk/www/biomaterials/bioplates/index.jsp

    r5051 r5060  
    136136    else
    137137    {
    138       dc.reattachItem(bioPlate);
     138      dc.reattachItem(bioPlate, false);
    139139      message = "Bioplate updated";
    140140    }
  • trunk/www/biomaterials/bioplates/wells/index.jsp

    r4864 r5060  
    128128      dc = sc.newDbControl();
    129129      BioWell biowell = (BioWell)cc.getObject("item");
    130       dc.reattachItem(biowell);
     130      dc.reattachItem(biowell, false);
    131131      MeasuredBioMaterial oldMbm = biowell.getBioMaterial();
    132132      if (oldMbm != null)
    133133      {
    134         dc.reattachItem(oldMbm);
     134        dc.reattachItem(oldMbm, false);
    135135        oldMbm.setBioWell(null);       
    136136      }
  • trunk/www/biomaterials/biosources/index.jsp

    r4901 r5060  
    157157    else
    158158    {
    159       dc.reattachItem(bioSource);
     159      dc.reattachItem(bioSource, false);
    160160      message = "Biosource updated";
    161161    }
  • trunk/www/biomaterials/events/index.jsp

    r4889 r5060  
    133133    else
    134134    {
    135       dc.reattachItem(event);
     135      dc.reattachItem(event, false);
    136136      message = "Event updated";
    137137    }
  • trunk/www/biomaterials/extracts/index.jsp

    r4900 r5060  
    185185    else
    186186    {
    187       dc.reattachItem(extract);
    188       dc.reattachItem(extract.getCreationEvent());
     187      dc.reattachItem(extract, false);
     188      dc.reattachItem(extract.getCreationEvent(), false);
    189189      message = "Extract updated";
    190190    }
  • trunk/www/biomaterials/labeledextracts/index.jsp

    r4901 r5060  
    191191    else
    192192    {
    193       dc.reattachItem(extract);
    194       dc.reattachItem(extract.getCreationEvent());
     193      dc.reattachItem(extract, false);
     194      dc.reattachItem(extract.getCreationEvent(), false);
    195195      message = "Labeled extract updated";
    196196      if (labelId >= 0) // < 0 = denied or unchanged
  • trunk/www/biomaterials/labels/index.jsp

    r4889 r5060  
    136136    else
    137137    {
    138       dc.reattachItem(label);
     138      dc.reattachItem(label, false);
    139139      message = "Label updated";
    140140    }
  • trunk/www/biomaterials/lists/index.jsp

    r4723 r5060  
    213213    else
    214214    {
    215       dc.reattachItem(list);
     215      dc.reattachItem(list, false);
    216216      message = "List updated";
    217217    }
     
    362362    dc = sc.newDbControl();
    363363    BioMaterialList bl = (BioMaterialList)cc.getObject("item");
    364     dc.reattachItem(bl);
     364    dc.reattachItem(bl, false);
    365365   
    366366    String mergeType = request.getParameter("mergeType");
  • trunk/www/biomaterials/samples/index.jsp

    r4901 r5060  
    182182    else
    183183    {
    184       dc.reattachItem(sample);
    185       dc.reattachItem(sample.getCreationEvent());
     184      dc.reattachItem(sample, false);
     185      dc.reattachItem(sample.getCreationEvent(), false);
    186186      message = "Sample updated";
    187187    }
  • trunk/www/common/annotations/index.jsp

    r4510 r5060  
    6161    Annotatable oldItem = (Annotatable)cc.getObject("item");
    6262    Annotatable newItem = (Annotatable)itemType.getById(newDc, itemId);
    63     oldDc.reattachItem((BasicItem)oldItem);
     63    oldDc.reattachItem((BasicItem)oldItem, false);
    6464    Base.updateAnnotations(newDc, oldItem, newItem, request);
    6565    oldDc.close();
  • trunk/www/common/anytoany/index.jsp

    r4510 r5060  
    100100    else
    101101    {
    102       dc.reattachItem(anyToAny);
     102      dc.reattachItem(anyToAny, false);
    103103      message = "Any-to-any link updated";
    104104    }
  • trunk/www/common/import/select_plugin.jsp

    r4889 r5060  
    174174          {
    175175            lastPlugin = pd;
    176             dc.reattachItem(pd);
     176            dc.reattachItem(pd, false);
    177177            boolean autoDetecting = !noAutodetect && pd.supports(autoDetectingType);
    178178            String supportsConfig = pd.supportsConfigurations() ? "true" : "false";
  • trunk/www/common/overview/info.jsp

    r4840 r5060  
    317317      {
    318318        Annotation a = (Annotation)item;
    319         dc.reattachItem(a);
     319        dc.reattachItem(a, false);
    320320        annotations = Collections.singletonList(a);
    321321        try
     
    337337          {
    338338            annotatable = (Annotatable)parentItem;
    339             dc.reattachItem((BasicItem)annotatable);
     339            dc.reattachItem((BasicItem)annotatable, false);
    340340            if (annotatable.isAnnotated())
    341341            {
     
    354354        if (annotatable.isAnnotated())
    355355        {
    356           dc.reattachItem((BasicItem)annotatable);
     356          dc.reattachItem((BasicItem)annotatable, false);
    357357 
    358358          // Load annotations & protocol parameters
  • trunk/www/common/plugin/configure.jsp

    r4889 r5060  
    9292  PluginDefinition plugin = (PluginDefinition)sc.getSessionSetting("plugin.configure.plugin");
    9393  Job job = (Job)sc.getSessionSetting("plugin.configure.job");
    94   dc.reattachItem(plugin);
     94  dc.reattachItem(plugin, false);
    9595  boolean configureByExample = false;
    9696  PluginConfiguration pluginConfig = (PluginConfiguration)sc.getSessionSetting("plugin.configure.config");
  • trunk/www/common/plugin/finish_job.jsp

    r4537 r5060  
    6464{
    6565  Job job = (Job)sc.getSessionSetting("plugin.configure.job");
    66   dc.reattachItem(job);
     66  dc.reattachItem(job, false);
    6767  PluginDefinition plugin = job.getPluginDefinition();
    6868  PluginConfiguration pluginConfig = job.getPluginConfiguration();
  • trunk/www/common/plugin/index.jsp

    r4974 r5060  
    533533    if (job.isInDatabase())
    534534    {
    535       dc.reattachItem(job);
     535      dc.reattachItem(job, false);
    536536    }
    537537    else
  • trunk/www/common/plugin/select_plugin.jsp

    r4889 r5060  
    165165          {
    166166            lastPlugin = pd;
    167             dc.reattachItem(pd);
     167            dc.reattachItem(pd, false);
    168168            String supportsConfig = pd.supportsConfigurations() ? "true" : "false";
    169169            String requiresConfig = pd.requiresConfiguration() ? "true" : "false";
  • trunk/www/filemanager/directories/index.jsp

    r5010 r5060  
    139139    else
    140140    {
    141       dc.reattachItem(directory);
     141      dc.reattachItem(directory, false);
    142142      message = "Directory updated";
    143143    }
  • trunk/www/filemanager/files/index.jsp

    r4951 r5060  
    162162    else
    163163    {
    164       dc.reattachItem(file);
     164      dc.reattachItem(file, false);
    165165      message = "File updated";
    166166    }
  • trunk/www/filemanager/upload/upload.jsp

    r4889 r5060  
    141141        stopIfFileExists = !f.getName().equals(uploadedFile.getFilename());
    142142        if (stopIfFileExists) fileExists = File.exists(dc, directory, uploadedFile.getFilename());
    143         dc.reattachItem(f);
     143        dc.reattachItem(f, false);
    144144      }
    145145      if (fileExists && stopIfFileExists)
  • trunk/www/lims/arraybatches/index.jsp

    r4889 r5060  
    143143    else
    144144    {
    145       dc.reattachItem(batch);
     145      dc.reattachItem(batch, false);
    146146      message = "Array batch updated";
    147147    }
  • trunk/www/lims/arraydesigns/index.jsp

    r4901 r5060  
    183183    else
    184184    {
    185       dc.reattachItem(design);
     185      dc.reattachItem(design, false);
    186186      if (variant != null)
    187187      {
     
    358358    dc = sc.newDbControl();
    359359    ArrayDesign design = (ArrayDesign)cc.getObject("item");
    360     dc.reattachItem(design);
     360    dc.reattachItem(design, false);
    361361   
    362362    List<Plate> plates = new java.util.LinkedList<Plate>();
  • trunk/www/lims/arrayslides/index.jsp

    r4889 r5060  
    147147    else
    148148    {
    149       dc.reattachItem(slide);
     149      dc.reattachItem(slide, false);
    150150      message = "Array slide updated";
    151151    }
  • trunk/www/lims/geometries/index.jsp

    r4901 r5060  
    157157    else
    158158    {
    159       dc.reattachItem(geometry);
     159      dc.reattachItem(geometry, false);
    160160      message = "Plate geometry updated";
    161161    }
  • trunk/www/lims/platemappings/index.jsp

    r4889 r5060  
    145145    else
    146146    {
    147       dc.reattachItem(mapping);
     147      dc.reattachItem(mapping, false);
    148148      message = "Plate mapping updated";
    149149    }
  • trunk/www/lims/plates/events/index.jsp

    r4889 r5060  
    138138    else
    139139    {
    140       dc.reattachItem(event);
     140      dc.reattachItem(event, false);
    141141      message = "Event updated";
    142142    }
  • trunk/www/lims/plates/index.jsp

    r4889 r5060  
    140140    else
    141141    {
    142       dc.reattachItem(plate);
     142      dc.reattachItem(plate, false);
    143143      message = "Plate updated";
    144144    }
  • trunk/www/lims/plates/wells/index.jsp

    r4889 r5060  
    120120    dc = sc.newDbControl();
    121121    Well well = (Well)cc.getObject("item");
    122     dc.reattachItem(well);
     122    dc.reattachItem(well, false);
    123123    message = "Well updated";
    124124   
  • trunk/www/lims/platetypes/eventtypes/index.jsp

    r4889 r5060  
    131131    else
    132132    {
    133       dc.reattachItem(eventType);
     133      dc.reattachItem(eventType, false);
    134134      message = "Event type updated";
    135135    }
  • trunk/www/lims/platetypes/index.jsp

    r4901 r5060  
    162162    else
    163163    {
    164       dc.reattachItem(plateType);
     164      dc.reattachItem(plateType, false);
    165165      message = "Plate type updated";
    166166    }
  • trunk/www/my_base/projects/index.jsp

    r4889 r5060  
    143143    else
    144144    {
    145       dc.reattachItem(project);
     145      dc.reattachItem(project, false);
    146146      message = "Project updated";
    147147    }
  • trunk/www/my_base/user/submit_user.jsp

    r4889 r5060  
    6666    }
    6767    User user = (User)sc.getSessionSetting("user");
    68     dc.reattachItem(user);
     68    dc.reattachItem(user, false);
    6969
    7070    // Contact information tab
  • trunk/www/plugins/net/sf/basedb/plugins/jep_extra_value_calculator.jsp

    r4917 r5060  
    7373  dc = sc.newDbControl();
    7474  Job job = (Job)sc.getSessionSetting("plugin.configure.job");
    75   dc.reattachItem(job);
     75  dc.reattachItem(job, false);
    7676  BioAssaySet source = null;
    7777  if (job != null) source = (BioAssaySet)job.getParameterValue("source");
  • trunk/www/plugins/net/sf/basedb/plugins/jep_filter.jsp

    r4917 r5060  
    7272  dc = sc.newDbControl();
    7373  Job job = (Job)sc.getSessionSetting("plugin.configure.job");
    74   dc.reattachItem(job);
     74  dc.reattachItem(job, false);
    7575  BioAssaySet source = null;
    7676  source = (BioAssaySet)job.getParameterValue("source");
  • trunk/www/plugins/net/sf/basedb/plugins/jep_intensity_transformer.jsp

    r4974 r5060  
    6363  dc = sc.newDbControl();
    6464  Job job = (Job)sc.getSessionSetting("plugin.configure.job");
    65   dc.reattachItem(job);
     65  dc.reattachItem(job, false);
    6666  BioAssaySet source = null;
    6767  source = (BioAssaySet)job.getParameterValue("source");
  • trunk/www/views/experiments/bioassays/index.jsp

    r4978 r5060  
    136136    if (ba != null)
    137137    {
    138       dc.reattachItem(ba);
     138      dc.reattachItem(ba, false);
    139139      message = "Bioassay updated";
    140140      ba.setName(Values.getStringOrNull(request.getParameter("name")));
  • trunk/www/views/experiments/bioassaysets/index.jsp

    r4910 r5060  
    200200    if (bas != null)
    201201    {
    202       dc.reattachItem(bas);
     202      dc.reattachItem(bas, false);
    203203      message = "Bioassay set updated";
    204204      bas.setName(Values.getStringOrNull(request.getParameter("name")));
  • trunk/www/views/experiments/index.jsp

    r4889 r5060  
    149149    else
    150150    {
    151       dc.reattachItem(experiment);
     151      dc.reattachItem(experiment, false);
    152152      message = "Experiment updated";
    153153    }
  • trunk/www/views/experiments/spotdata/index.jsp

    r4951 r5060  
    137137    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, subContext, pageContext, defaultContext);
    138138    dc = sc.newDbControl();
    139     if (bas != null) dc.reattachItem(bas);
    140     if (ba != null) dc.reattachItem(ba);
     139    if (bas != null) dc.reattachItem(bas, false);
     140    if (ba != null) dc.reattachItem(ba, false);
    141141    final DynamicSpotQuery query = ba != null ? ba.getSpotData() : bas.getSpotData();
    142142    //cc.configureQuery(query, true);
     
    150150    ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, subContext, pageContext, defaultContext);
    151151    dc = sc.newDbControl();
    152     if (bas != null) dc.reattachItem(bas);
    153     if (ba != null) dc.reattachItem(ba);
     152    if (bas != null) dc.reattachItem(bas, false);
     153    if (ba != null) dc.reattachItem(ba, false);
    154154    final DynamicSpotQuery query = ba != null ? ba.getSpotData() : bas.getSpotData();
    155155    cc.configureQuery(dc, query, Collections.singletonList("@id"));
  • trunk/www/views/experiments/transformations/index.jsp

    r4511 r5060  
    111111    if (t != null)
    112112    {
    113       dc.reattachItem(t);
     113      dc.reattachItem(t, false);
    114114      message = "Transformation updated";
    115115      t.setName(Values.getStringOrNull(request.getParameter("name")));
  • trunk/www/views/formulas/index.jsp

    r4935 r5060  
    142142    else
    143143    {
    144       dc.reattachItem(formula);
     144      dc.reattachItem(formula, false);
    145145      message = "Formula updated";
    146146    }
  • trunk/www/views/hybridizations/index.jsp

    r4901 r5060  
    178178    {
    179179      creationEvent = hyb.getCreationEvent();
    180       dc.reattachItem(hyb);
    181       dc.reattachItem(creationEvent);
     180      dc.reattachItem(hyb, false);
     181      dc.reattachItem(creationEvent, false);
    182182      message = "Hybridization updated";
    183183    }
  • trunk/www/views/rawbioassays/index.jsp

    r4901 r5060  
    273273    else
    274274    {
    275       dc.reattachItem(rba);
     275      dc.reattachItem(rba, false);
    276276      if (variant != null)
    277277      {
  • trunk/www/views/reporterlists/index.jsp

    r4889 r5060  
    223223    else
    224224    {
    225       dc.reattachItem(rl);
     225      dc.reattachItem(rl, false);
    226226      message = "Reporter list updated";
    227227    }
     
    375375    dc = sc.newDbControl();
    376376    ReporterList rl = (ReporterList)cc.getObject("item");
    377     dc.reattachItem(rl);
     377    dc.reattachItem(rl, false);
    378378   
    379379    String mergeType = request.getParameter("mergeType");
  • trunk/www/views/scans/images/index.jsp

    r4889 r5060  
    126126    else
    127127    {
    128       dc.reattachItem(image);
     128      dc.reattachItem(image, false);
    129129      message = "Image updated";
    130130    }
  • trunk/www/views/scans/index.jsp

    r4901 r5060  
    162162    else
    163163    {
    164       dc.reattachItem(scan);
     164      dc.reattachItem(scan, false);
    165165      message = "Scan updated";
    166166    }
Note: See TracChangeset for help on using the changeset viewer.