コード例 #1
0
  @Override
  protected List<ModificationItem> storeDiffs(Device a, Device b, List<ModificationItem> mods) {
    super.storeDiffs(a, b, mods);
    if (!(a instanceof ArchiveDevice && b instanceof ArchiveDevice)) return mods;

    ArchiveDevice aa = (ArchiveDevice) a;
    ArchiveDevice bb = (ArchiveDevice) b;
    storeDiff(
        mods, "dcmFuzzyAlgorithmClass", aa.getFuzzyAlgorithmClass(), bb.getFuzzyAlgorithmClass());
    storeDiff(
        mods,
        "dcmConfigurationStaleTimeout",
        aa.getConfigurationStaleTimeout(),
        bb.getConfigurationStaleTimeout(),
        0);
    return mods;
  }
コード例 #2
0
 @Override
 protected Attributes storeTo(Device device, Attributes attrs) {
   super.storeTo(device, attrs);
   if (!(device instanceof ArchiveDevice)) return attrs;
   ArchiveDevice arcDev = (ArchiveDevice) device;
   storeNotNull(attrs, "dcmFuzzyAlgorithmClass", arcDev.getFuzzyAlgorithmClass());
   storeNotDef(attrs, "dcmConfigurationStaleTimeout", arcDev.getConfigurationStaleTimeout(), 0);
   return attrs;
 }