1 2 12 package com.versant.core.common; 13 14 import com.versant.core.util.OIDObjectOutput; 15 import com.versant.core.util.OIDObjectInput; 16 17 import java.io.IOException ; 18 19 23 public class OrderedCollectionDiff extends CollectionDiff { 24 25 public OrderedCollectionDiff() { 26 } 27 28 public OrderedCollectionDiff(VersantFieldMetaData fmd) { 29 super(fmd); 30 } 31 32 35 public int[] deletedIndexes; 36 37 41 public int[] insertedIndexes; 42 43 public String toString() { 44 return "<OrderedCollectionDiff inserted = " + (insertedIndexes != null ? insertedIndexes.length : 0) 45 + " deleted = " + (deletedIndexes != null ? deletedIndexes.length : 0); 46 } 47 48 public void writeExternal(OIDObjectOutput out) throws IOException { 49 super.writeExternal(out); 50 SerUtils.writeIntArray(deletedIndexes, out); 51 SerUtils.writeIntArray(insertedIndexes, out); 52 } 53 54 public void readExternal(OIDObjectInput in) throws IOException , 55 ClassNotFoundException { 56 super.readExternal(in); 57 deletedIndexes = SerUtils.readIntArray(in); 58 insertedIndexes = SerUtils.readIntArray(in); 59 } 60 61 } 62 | Popular Tags |