public final boolean isAutoGeneratedColumn(final int position) { return this.autoGenColumns != null && this.autoGenColumns.containsKey(position); }
public final ColumnDescriptor getAutoGeneratedColumn(final int position) { if (this.autoGenColumns != null) { return (ColumnDescriptor)this.autoGenColumns.get(position); } return null; }
/** * Compares this map with another map for equality of their stored * entries. * * @param other an <code>Object</code> value * @return a <code>boolean</code> value */ @Override // GemStoneAddition public boolean equals(Object other) { if (! (other instanceof TIntObjectHashMap)) { return false; } TIntObjectHashMap that = (TIntObjectHashMap)other; if (that.size() != this.size()) { return false; } return forEachEntry(new EqProcedure(that)); }
this.refColSameAfterModBitsMapping = new TIntObjectHashMap(); int numCols = this.refColUpdtd2DependentCols.size(); refColSameAfterUpdt = new byte[FormatableBitSet .numBytesFromBits(numCols)]; this.refColSameAfterModBitsMapping.put(rowNum, refColSameAfterUpdt); .get(colNum); TIntIterator ti = dependentCols.iterator(); while (ti.hasNext()) {
if (_map.equals(other)) { return true; // comparing two trove maps } else if (other instanceof Map) { Map that = (Map)other; if (that.size() != _map.size()) { return false; // different sizes, no need to compare } else { // now we have to do it the hard way int k = unwrapKey(key); Object v = unwrapValue(val); if (_map.containsKey(k) && v == _map.get(k)) {
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); } } }
@Override // GemStoneAddition public int size() { return _map.size(); } @Override // GemStoneAddition
/** * 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))); }
public final int[] getAutoGeneratedColumns() { if (this.autoGenColumns != null) { return this.autoGenColumns.keys(); } return null; }
.getGemFireContainer(); if (!this.container.isTemporaryContainer()) { TIntObjectHashMap tempRefColUpdtd2DependentCols = new TIntObjectHashMap();
/** * Empties the map. */ @Override // GemStoneAddition public void clear() { this._map.clear(); }
/** * Clones the underlying trove collection and returns the clone wrapped in a new * decorator instance. This is a shallow clone except where primitives are * concerned. * * @return a copy of the receiver */ @Override // GemStoneAddition public Object clone() { try { TIntObjectHashMapDecorator copy = (TIntObjectHashMapDecorator) super.clone(); copy._map = (TIntObjectHashMap)_map.clone(); return copy; } catch (CloneNotSupportedException e) { // assert(false); throw new InternalError(); // we are cloneable, so this does not happen } }
this.refColSameAfterModBitsMapping = new TIntObjectHashMap(); int numCols = this.refColUpdtd2DependentCols.size(); refColSameAfterUpdt = new byte[FormatableBitSet .numBytesFromBits(numCols)]; this.refColSameAfterModBitsMapping.put(rowNum, refColSameAfterUpdt); .get(colNum); TIntIterator ti = dependentCols.iterator(); while (ti.hasNext()) {
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); } } }
/** * Returns the number of entries in the map. * @return the map's size. */ @Override // GemStoneAddition public int size() { return this._map.size(); }
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; } }