Package siena.remote

Examples of siena.remote.RemotePersistenceManager.createQuery()


   
    remote.get(TESLA);
    assertEquals("get", mock.action);
    assertEquals(expected, mock.object);
   
    remote.createQuery(Person.class).fetch();
    assertEquals(0, mock.lastQuery.filters.size());
    assertEquals(0, mock.lastQuery.orders.size());
   
    remote.createQuery(Person.class).order("firstName").order("lastName").fetch();
    assertEquals(0, mock.lastQuery.filters.size());
View Full Code Here


   
    remote.createQuery(Person.class).fetch();
    assertEquals(0, mock.lastQuery.filters.size());
    assertEquals(0, mock.lastQuery.orders.size());
   
    remote.createQuery(Person.class).order("firstName").order("lastName").fetch();
    assertEquals(0, mock.lastQuery.filters.size());
    assertEquals(Arrays.asList("firstName", "lastName"), mock.lastQuery.orders);
   
    remote.createQuery(Person.class)
      .filter("city", "Ulm")
View Full Code Here

   
    remote.createQuery(Person.class).order("firstName").order("lastName").fetch();
    assertEquals(0, mock.lastQuery.filters.size());
    assertEquals(Arrays.asList("firstName", "lastName"), mock.lastQuery.orders);
   
    remote.createQuery(Person.class)
      .filter("city", "Ulm")
      .filter("firstName", "Albert")
      .filter("lastName", null)
      .order("firstName")
      .order("lastName")
View Full Code Here

    properties.setProperty("connector", MockConnector.class.getName());
    properties.setProperty("serializer", MockConnector.class.getName());
    properties.setProperty("key", "siena");
    remote.init(properties);
   
    remote.createQuery(Person.class).fetch();
  }
 
  public void testFailSecurity() {
    MockPersistenceManager mock = new MockPersistenceManager();
    PersistenceManagerFactory.install(mock, Person.class);
View Full Code Here

    remote.init(properties);
   
    MockConnector.key = "1234";
   
    try {
      remote.createQuery(Person.class).fetch();
    } catch(SienaException e) {
      return;
    }
    fail("It should have failed due to invalid hash");
  }
View Full Code Here

TOP
Copyright © 2015 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.