Package de.micromata.hibernate.history.delta

Examples of de.micromata.hibernate.history.delta.PropertyDelta


        if (newValue instanceof ShortDisplayNameCapable) {
          nv = ((ShortDisplayNameCapable) newValue).getShortDisplayName();
        } else {
          nv = newValue;
        }
        PropertyDelta delta = new MySimplePropertyDelta(fieldname, method.getReturnType(), ov, nv);
        propertyDeltas.add(delta);
      }
    }
    return propertyDeltas;
  }
View Full Code Here


    assertEquals(type, entry.getType());
    assertEquals(entityId, entry.getEntityId());
    if (propertyName != null) {
      final List<PropertyDelta> delta = entry.getDelta();
      assertEquals(1, delta.size());
      final PropertyDelta prop = delta.get(0);
      assertPropertyDelta(prop, propertyName, classType, oldValue, newValue);
    }
  }
View Full Code Here

    log.debug(entry);
    assertHistoryEntry(entry, id, user, HistoryEntryType.UPDATE, null, null, null, null);
    List<PropertyDelta> delta = entry.getDelta();
    assertEquals(2, delta.size());
    for (int i = 0; i < 2; i++) {
      PropertyDelta prop = delta.get(0);
      if ("name".equals(prop.getPropertyName()) == true) {
        assertPropertyDelta(prop, "name", String.class, "History 2", "History test");
      } else {
        assertPropertyDelta(prop, "task", TaskDO.class, getTask("1.2").getId(), getTask("1.1").getId());
      }
    }
View Full Code Here

   */
  void assertGroupHistoryEntry(final HistoryEntry entry, final String[] expectedAssignedUserNames, final String[] expectedUnassignedUserNames)
  {
    final List<PropertyDelta> list = entry.getDelta();
    assertEquals(1, list.size());
    final PropertyDelta delta = list.get(0);
    assertUserIds(expectedUnassignedUserNames, delta.getOldValue());
    assertUserIds(expectedAssignedUserNames, delta.getNewValue());
  }
View Full Code Here

   */
  void assertUserHistoryEntry(final HistoryEntry entry, final String[] expectedAssignedGroupNames, final String[] expectedUnassignedGroupNames)
  {
    final List<PropertyDelta> list = entry.getDelta();
    assertEquals(1, list.size());
    final PropertyDelta delta = list.get(0);
    assertGroupIds(expectedUnassignedGroupNames, delta.getOldValue());
    assertGroupIds(expectedAssignedGroupNames, delta.getNewValue());
  }
View Full Code Here

    log.debug(entry);
    assertHistoryEntry(entry, id, user, HistoryEntryType.UPDATE, null, null, null, null);
    final List<PropertyDelta> delta = entry.getDelta();
    assertEquals(2, delta.size());
    for (int i = 0; i < 2; i++) {
      final PropertyDelta prop = delta.get(0);
      if ("name".equals(prop.getPropertyName()) == true) {
        assertPropertyDelta(prop, "name", String.class, "History 2", "History test");
      } else {
        assertPropertyDelta(prop, "task", TaskDO.class, getTask("1.2").getId(), getTask("1.1").getId());
      }
    }
View Full Code Here

TOP

Related Classes of de.micromata.hibernate.history.delta.PropertyDelta

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.