private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); int size = stream.readInt(); setUp(size); while (size-- > 0) { int key = stream.readInt(); Object val = stream.readObject(); put(key, val); } } } // TIntObjectHashMap
/** * Inserts a key/value pair into the map. * * @param key an <code>Object</code> value * @param value an <code>Object</code> value * @return the previous value associated with <tt>key</tt>, * or Integer(0) if none was found. */ @Override // GemStoneAddition public Object put(Object key, Object value) { return wrapValue(_map.put(unwrapKey(key), unwrapValue(value))); }
private Map<Integer, Boolean> getReferencedUpdateCols(TIntObjectHashMap tempRefColUpdtd2DependentCols) { int[] refKeyCols = this.container.getExtraTableInfo() .getReferencedKeyColumns(); // check if any of the modified cols is a ref key column of a // reference // integrity constraint // refKeyCols = fkInfo.colArray; if (refKeyCols != null) { SortedMap<Integer, Boolean> referencedImpactedColsMap = new TreeMap<Integer, Boolean>(); // SortedSet<Integer> onlyRefUpadtedCols = new TreeSet(); for (int i = 0; i < constants.changedColumnIds.length; ++i) { int modColID = constants.changedColumnIds[i]; for (int refKeyColID : refKeyCols) { if (refKeyColID == modColID) { // onlyRefUpadtedCols.add(refKeyColID); TIntHashSet dependentCols = new TIntHashSet(refKeyCols.length); tempRefColUpdtd2DependentCols.put(refKeyColID, dependentCols); referencedImpactedColsMap.put(refKeyColID, Boolean.TRUE); addCompanionRefColsToMap(refKeyColID, referencedImpactedColsMap, dependentCols); } } } return referencedImpactedColsMap; } else { return null; } }
private Map<Integer, Boolean> getReferencedUpdateCols(TIntObjectHashMap tempRefColUpdtd2DependentCols) { int[] refKeyCols = this.container.getExtraTableInfo() .getReferencedKeyColumns(); // check if any of the modified cols is a ref key column of a // reference // integrity constraint // refKeyCols = fkInfo.colArray; if (refKeyCols != null) { SortedMap<Integer, Boolean> referencedImpactedColsMap = new TreeMap<Integer, Boolean>(); // SortedSet<Integer> onlyRefUpadtedCols = new TreeSet(); for (int i = 0; i < constants.changedColumnIds.length; ++i) { int modColID = constants.changedColumnIds[i]; for (int refKeyColID : refKeyCols) { if (refKeyColID == modColID) { // onlyRefUpadtedCols.add(refKeyColID); TIntHashSet dependentCols = new TIntHashSet(refKeyCols.length); tempRefColUpdtd2DependentCols.put(refKeyColID, dependentCols); referencedImpactedColsMap.put(refKeyColID, Boolean.TRUE); addCompanionRefColsToMap(refKeyColID, referencedImpactedColsMap, dependentCols); } } } return referencedImpactedColsMap; } else { return null; } }
private final void refreshAutoGenColumnInfo() { this.autoGenColumns = null; this.autoGenColumnNames = null; // loop over the table columns for getting auto-gen column information ColumnDescriptor cd; final ColumnDescriptorList cdl = this.td.getColumnDescriptorList(); for (int index = 0; index < cdl.size(); ++index) { cd = cdl.elementAt(index); if (cd.isAutoincrement()) { if (this.autoGenColumns == null) { // user provided column indexes this.autoGenColumns = new TIntObjectHashMap(); this.autoGenColumnNames = new HashMap<String, ColumnDescriptor>(); } this.autoGenColumns.put(cd.getPosition(), cd); this.autoGenColumnNames.put(cd.getColumnName(), cd); } } }
private final void refreshAutoGenColumnInfo() { this.autoGenColumns = null; this.autoGenColumnNames = null; // loop over the table columns for getting auto-gen column information ColumnDescriptor cd; final ColumnDescriptorList cdl = this.td.getColumnDescriptorList(); for (int index = 0; index < cdl.size(); ++index) { cd = cdl.elementAt(index); if (cd.isAutoincrement()) { if (this.autoGenColumns == null) { // user provided column indexes this.autoGenColumns = new TIntObjectHashMap(); this.autoGenColumnNames = new HashMap<String, ColumnDescriptor>(); } this.autoGenColumns.put(cd.getPosition(), cd); this.autoGenColumnNames.put(cd.getColumnName(), cd); } } }
bytes[j] = in.readByte(); this.refColSameAfterModBitsMapping.put(rowNum,bytes);
bytes[j] = in.readByte(); this.refColSameAfterModBitsMapping.put(rowNum,bytes);
refColSameAfterUpdt = new byte[FormatableBitSet .numBytesFromBits(numCols)]; this.refColSameAfterModBitsMapping.put(rowNum, refColSameAfterUpdt);
refColSameAfterUpdt = new byte[FormatableBitSet .numBytesFromBits(numCols)]; this.refColSameAfterModBitsMapping.put(rowNum, refColSameAfterUpdt);