Project

General

Profile

« Previous | Next » 

Revision 8454

On changes to system metadata in CNodeService and DocumentImpl, increment the serialVersion.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
40 40
import java.io.Reader;
41 41
import java.io.StringReader;
42 42
import java.io.Writer;
43
import java.math.BigInteger;
43 44
import java.net.URL;
44 45
import java.sql.PreparedStatement;
45 46
import java.sql.ResultSet;
......
3440 3441
        	guid.setValue(pid);
3441 3442
            SystemMetadata sysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(guid);
3442 3443
            if (sysMeta != null) {
3443
            	sysMeta.setArchived(true);
3444
				sysMeta.setSerialVersion(sysMeta.getSerialVersion().add(BigInteger.ONE));
3445
				sysMeta.setArchived(true);
3444 3446
            	sysMeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
3445 3447
				HazelcastService.getInstance().getSystemMetadataMap().put(guid, sysMeta);
3446 3448
				// submit for indexing
src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
396 396

  
397 397
			  SystemMetadata sysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(pid);
398 398
			  if ( sysMeta != null ) {
399
				sysMeta.setSerialVersion(sysMeta.getSerialVersion().add(BigInteger.ONE));
399 400
				sysMeta.setArchived(true);
400 401
				sysMeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
401 402
				HazelcastService.getInstance().getSystemMetadataMap().put(pid, sysMeta);
......
540 541

  
541 542
			  SystemMetadata sysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(pid);
542 543
			  if ( sysMeta != null ) {
544
				sysMeta.setSerialVersion(sysMeta.getSerialVersion().add(BigInteger.ONE));
543 545
				sysMeta.setArchived(true);
544 546
				sysMeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
545 547
				HazelcastService.getInstance().getSystemMetadataMap().put(pid, sysMeta);

Also available in: Unified diff