1 2 12 package com.versant.core.storagemanager.logging; 13 14 import com.versant.core.metadata.MDStatics; 15 16 import java.util.List ; 17 import java.util.Collections ; 18 import java.util.ArrayList ; 19 20 23 public class SmFetchBulkEvent extends SmFetchEventBase { 24 25 private int inputSize; 26 private String [] oids; 27 28 public SmFetchBulkEvent(int storageManagerId, int type, int inputSize, 29 String fetchGroup, String fieldName) { 30 super(storageManagerId, type, fieldName, fetchGroup); 31 this.inputSize = inputSize; 32 } 33 34 public int getInputSize() { 35 return inputSize; 36 } 37 38 41 public String [] getOids() { 42 return oids; 43 } 44 45 public void setOids(String [] oids) { 46 this.oids = oids; 47 } 48 49 52 public String getDescription() { 53 return inputSize + " input OID(s) " + 54 (fieldName == null ? "" : fieldName + " ") + 55 returnedSize + " state(s)"; 56 } 57 58 61 public List getInputOIDs() { 62 if (oids == null) return Collections.EMPTY_LIST; 63 int n = oids.length; 64 ArrayList a = new ArrayList (n); 65 for (int i = 0; i < n; i++) { 66 String oid = oids[i]; 67 int j = oid.indexOf(MDStatics.OID_CHAR_SEPERATOR); 68 int classId = Integer.parseInt(oid.substring(0, j)); 69 a.add(new ClassAndOID(oid, getNameForClassID(classId))); 70 } 71 return a; 72 } 73 74 } 75 | Popular Tags |