Package org.structr.core.entity

Examples of org.structr.core.entity.OneFourOneToOne


      final Property<Integer> key = OneFourOneToOne.integerProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
     
      final OneFourOneToOne testEntity = createTestRelationship(testOne, testFour, OneFourOneToOne.class);
     
      assertNotNull(testEntity);

      try (final Tx tx = app.tx()) {

        testEntity.setProperty(key, 2345);
        tx.success();
      }

      try (final Tx tx = app.tx()) {

        // check value from database
        assertEquals((Integer)2345, (Integer)testEntity.getProperty(key));

        Result<OneFourOneToOne> result = app.relationshipQuery(OneFourOneToOne.class).and(key, 2345).getResult();

        assertEquals(1, result.size());
        assertEquals(testEntity, result.get(0));
View Full Code Here


      final Property<Long> key = OneFourOneToOne.longProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
     
      final OneFourOneToOne testEntity = createTestRelationship(testOne, testFour, OneFourOneToOne.class);
     
      assertNotNull(testEntity);

      try (final Tx tx = app.tx()) {
       
        testEntity.setProperty(key, 2857312362L);
        tx.success();
      }

      try (final Tx tx = app.tx()) {
       
        // check value from database
        assertEquals((Long)2857312362L, (Long)testEntity.getProperty(key));

        Result<OneFourOneToOne> result = app.relationshipQuery(OneFourOneToOne.class).and(key, 2857312362L).getResult();

        assertEquals(1, result.size());
        assertEquals(testEntity, result.get(0));
View Full Code Here

      final Property<TestEnum> key = OneFourOneToOne.enumProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
     
      final OneFourOneToOne testEntity = createTestRelationship(testOne, testFour, OneFourOneToOne.class);
     
      assertNotNull(testEntity);

      try (final Tx tx = app.tx()) {

        testEntity.setProperty(key, TestEnum.Status1);
        tx.success();
      }
     
      try (final Tx tx = app.tx()) {

        // check value from database
        assertEquals(TestEnum.Status1, testEntity.getProperty(key));

        Result<OneFourOneToOne> result = app.relationshipQuery(OneFourOneToOne.class).and(key, TestEnum.Status1).getResult();

        assertEquals(1, result.size());
        assertEquals(testEntity, result.get(0));
View Full Code Here

      final Property<Double> key = OneFourOneToOne.doubleProperty;

      assertNotNull(testOne);
      assertNotNull(testFour);

      final OneFourOneToOne testEntity = createTestRelationship(testOne, testFour, OneFourOneToOne.class);

      assertNotNull(testEntity);

      try (final Tx tx = app.tx()) {

        testEntity.setProperty(key, 3.141592653589793238);
        tx.success();
      }

      try (final Tx tx = app.tx()) {

        // check value from database
        assertEquals(3.141592653589793238, testEntity.getProperty(key));

        Result<OneFourOneToOne> result = app.relationshipQuery(OneFourOneToOne.class).and(key, 3.141592653589793238).getResult();

        assertEquals(1, result.size());
        assertEquals(testEntity, result.get(0));
View Full Code Here

      final Property<String> key   = OneFourOneToOne.stringProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
     
      final OneFourOneToOne testEntity = createTestRelationship(testOne, testFour, OneFourOneToOne.class);
     
      assertNotNull(testEntity);

      try (final Tx tx = app.tx()) {
       
        testEntity.setProperty(key, "test");
        tx.success();
      }

      try (final Tx tx = app.tx()) {
       
        // check value from database
        assertEquals("test", testEntity.getProperty(key));

        Result<OneFourOneToOne> result = app.relationshipQuery(OneFourOneToOne.class).and(key, "test").getResult();

        assertEquals(result.size(), 1);
        assertEquals(result.get(0), testEntity);
View Full Code Here

      final Property<Boolean> key = OneFourOneToOne.booleanProperty;
     
      assertNotNull(testOne);
      assertNotNull(testFour);
     
      final OneFourOneToOne testEntity = createTestRelationship(testOne, testFour, OneFourOneToOne.class);
     
      assertNotNull(testEntity);

      try (final Tx tx = app.tx()) {

        testEntity.setProperty(key, true);
        tx.success();
      }
     
      try (final Tx tx = app.tx()) {

        // check value from database
        assertEquals((Boolean)true, (Boolean)testEntity.getProperty(key));

        Result<OneFourOneToOne> result = app.relationshipQuery(OneFourOneToOne.class).and(key, true).getResult();

        assertEquals(1, result.size());
        assertEquals(testEntity, result.get(0));
View Full Code Here

TOP

Related Classes of org.structr.core.entity.OneFourOneToOne

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.