Examples of PrimitiveVersionProperty


Examples of org.springframework.data.jpa.domain.sample.PrimitiveVersionProperty

  public void considersEntityWithPrimitiveVersionPropertySetToDefaultNew() {

    EntityInformation<PrimitiveVersionProperty, Serializable> information = new JpaMetamodelEntityInformation<PrimitiveVersionProperty, Serializable>(
        PrimitiveVersionProperty.class, em.getMetamodel());

    assertThat(information.isNew(new PrimitiveVersionProperty()), is(true));
  }
View Full Code Here

Examples of org.springframework.data.jpa.domain.sample.PrimitiveVersionProperty

  public void considersEntityAsNotNewWhenHavingIdSetAndUsingPrimitiveTypeForVersionProperty() {

    EntityInformation<PrimitiveVersionProperty, Serializable> information = new JpaMetamodelEntityInformation<PrimitiveVersionProperty, Serializable>(
        PrimitiveVersionProperty.class, em.getMetamodel());

    PrimitiveVersionProperty pvp = new PrimitiveVersionProperty();
    pvp.id = 100L;

    assertThat(information.isNew(pvp), is(false));
  }
View Full Code Here

Examples of org.springframework.data.jpa.domain.sample.PrimitiveVersionProperty

  public void fallsBackToIdInspectionForAPrimitiveVersionProperty() {

    EntityInformation<PrimitiveVersionProperty, Serializable> information = new JpaMetamodelEntityInformation<PrimitiveVersionProperty, Serializable>(
        PrimitiveVersionProperty.class, em.getMetamodel());

    PrimitiveVersionProperty pvp = new PrimitiveVersionProperty();
    pvp.version = 1L;

    assertThat(information.isNew(pvp), is(true));

    pvp.id = 1L;
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.