Package org.springframework.data.jpa.domain.sample

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


  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

  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

Related Classes of org.springframework.data.jpa.domain.sample.PrimitiveVersionProperty

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.