Examples of dirtyPropertyNames()


Examples of com.getperka.flatpack.PersistenceAware.dirtyPropertyNames()

      Class<? extends HasUuid> key = entity.getClass();

      // Ignore any dirty-tracking entity with no mutations
      if (entity instanceof PersistenceAware) {
        PersistenceAware maybeDirty = (PersistenceAware) entity;
        if (maybeDirty.wasPersistent() && maybeDirty.dirtyPropertyNames().isEmpty()) {
          continue;
        }
      }

      List<HasUuid> list = toReturn.get(key);
View Full Code Here

Examples of com.getperka.flatpack.domain.PersistentEmployee.dirtyPropertyNames()

   */
  @Test
  public void testSparseProperties() throws IOException {
    PersistentEmployee e = makePersistentEmployee();
    e.setTrackedProperty("trackedProperty");
    assertEquals(Collections.singleton("trackedProperty"), e.dirtyPropertyNames());

    StringWriter out = new StringWriter();
    flatpack.getPacker().pack(FlatPackEntity.entity(e), out);

    assertFalse(out.toString().contains("name"));
View Full Code Here

Examples of com.getperka.flatpack.domain.PersistentEmployee.dirtyPropertyNames()

    FlatPackEntity<PersistentEmployee> entity = flatpack.getUnpacker()
        .unpack(PersistentEmployee.class, new StringReader(out.toString()), null);
    PersistentEmployee e2 = entity.getValue();
    assertTrue(e2.wasPersistent());
    assertTrue(e2.dirtyPropertyNames().isEmpty());
  }

  /**
   * Just make sure the test resolver is capturing data correctly.
   */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.