@SuppressWarnings("unchecked") public <V> V getChangeValue(int index, Class<V> cast) { return (V)changes[index].getValue(); }
@SuppressWarnings("unchecked") public <V> V getChangeValue(int index, Class<V> cast) { return (V)changes[index].getValue(); }
@SuppressWarnings("unchecked") public <V> V getChangeValue(int index, Class<V> cast) { return (V)changes[index].getValue(); }
public Object getChangeValue(int index) { return changes[index].getValue(); }
public Object getChangeValue(int index) { return changes[index].getValue(); }
public Object getChangeValue(int index) { return changes[index].getValue(); }
if (cc.getValue() instanceof ChangeRef) { for (int i = 0; i < savedList.size(); i++) { if (isForEntity(mergeContext, (ChangeRef)cc.getValue(), savedList.get(i))) { savedList.remove(i); i--; if (mergeContext.objectEquals(cc.getValue(), savedList.get(i))) { savedList.remove(i); i--; savedList.add(cc.getValue()); if (cc.getKey() == null && cc.getValue() instanceof ChangeRef) { for (Iterator<Object> ic = coll.iterator(); ic.hasNext(); ) { Object c = ic.next(); if (isForEntity(mergeContext, (ChangeRef) cc.getValue(), c)) ic.remove(); for (Iterator<Object> ic = coll.iterator(); ic.hasNext(); ) { Object c = ic.next(); if (isForEntity(mergeContext, (ChangeRef) cc.getValue(), c)) ic.remove(); coll.add(cc.getValue());
Object key = cc.getKey() instanceof ChangeRef ? mergeContext.getCachedObject(cc.getKey()) : cc.getKey(); if (cc.getType() == -1) { if (key != null && cc.getValue() instanceof ChangeRef && isForEntity(mergeContext, (ChangeRef)cc.getValue(), savedMap.get(key))) savedMap.remove(key); else if (key != null && mergeContext.objectEquals(cc.getValue(), savedMap.get(key))) savedMap.remove(key); savedMap.put(key, cc.getValue()); if (key != null && cc.getValue() instanceof ChangeRef && isForEntity(mergeContext, (ChangeRef)cc.getValue(), map.get(key))) map.remove(key); else if (key != null && mergeContext.objectEquals(cc.getValue(), map.get(key))) map.remove(key); map.put(key, cc.getValue());
if (cc.getKey() != null && (Integer)cc.getKey() >= 0 && cc.getValue() instanceof ChangeRef && isForEntity(mergeContext, (ChangeRef) cc.getValue(), savedList.get((Integer)cc.getKey()))) savedList.remove(((Integer)cc.getKey()).intValue()); else if (cc.getKey() != null && (Integer)cc.getKey() >= 0 && mergeContext.objectEquals(cc.getValue(), savedList.get((Integer)cc.getKey()))) savedList.remove(((Integer)cc.getKey()).intValue()); else if (cc.getKey() == null && cc.getValue() instanceof ChangeRef) { for (int i = 0; i < savedList.size(); i++) { if (isForEntity(mergeContext, (ChangeRef)cc.getValue(), savedList.get(i))) { savedList.remove(i); i--; if (mergeContext.objectEquals(cc.getValue(), savedList.get(i))) { savedList.remove(i); i--; log.warn("Could not add received element at index %d", key); else savedList.add(key, cc.getValue()); savedList.add(cc.getValue()); else savedList.add(cc.getValue()); savedList.set(((Integer)cc.getKey()).intValue(), cc.getValue()); if (cc.getKey() != null && (Integer)cc.getKey() >= 0 && cc.getValue() instanceof ChangeRef && isForEntity(mergeContext, (ChangeRef)cc.getValue(), coll.get((Integer)cc.getKey()))) coll.remove(((Integer)cc.getKey()).intValue()); else if (cc.getKey() != null && (Integer)cc.getKey() >= 0 && mergeContext.objectEquals(cc.getValue(), coll.get((Integer)cc.getKey())))
elementType = ((ParameterizedType)collectionType).getActualTypeArguments()[0]; Object value = converters.convert(mergeObject(collectionChange.getValue(), cache), elementType); ((Set<Object>)collection).add(value); elementType = ((ParameterizedType)collectionType).getActualTypeArguments()[0]; Object value = converters.convert(mergeObject(collectionChange.getValue(), cache), elementType); ((List<Object>)collection).add((Integer)collectionChange.getKey(), value); Object value = converters.convert(mergeObject(collectionChange.getValue(), cache), valueType); ((Map<Object, Object>)collection).put(key, value); elementType = ((ParameterizedType)collectionType).getActualTypeArguments()[0]; Object value = converters.convert(mergeObject(collectionChange.getValue(), cache), elementType); Object removed = ((Set<Object>)collection).remove(value); cache.add(removed); elementType = ((ParameterizedType)collectionType).getActualTypeArguments()[0]; Object value = converters.convert(mergeObject(collectionChange.getValue(), cache), elementType); ((List<Object>)collection).set(index, value); Object value = converters.convert(mergeObject(collectionChange.getValue(), cache), valueType); ((Map<Object, Object>)collection).put(key, value);