Examples of Bbb


Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void refresh() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHogeRef().setModel(hoge);
        Datastore.put(bbb);
        Bbb model = ref.refresh();
        assertThat(bbb, is(notNullValue()));
        assertThat(ref.refresh(), is(not(sameInstance(model))));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void clear() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHogeRef().setModel(hoge);
        Datastore.put(bbb);
        ref.getModel();
        ref.clear();
        assertThat(ref.model, is(nullValue()));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void getModelList() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models = ref.getModelList();
        assertThat(models.size(), is(2));
        assertThat(models.get(0).getKey(), is(bbb.getKey()));
        assertThat(models.get(1).getKey(), is(bbb2.getKey()));
        assertThat(ref.getModelList(), is(sameInstance(models)));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void asQueryResultList() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        S3QueryResultList<Bbb> list = ref.query().asQueryResultList();
        assertThat(list.size(), is(2));
        assertThat(list.get(0).getKey(), is(bbb.getKey()));
        assertThat(list.get(1).getKey(), is(bbb2.getKey()));
        assertThat(list.getEncodedCursor(), is(notNullValue()));
        assertThat(list.getEncodedFilter(), is(notNullValue()));
        assertThat(list.getEncodedSorts(), is(notNullValue()));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void queryWithSort() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models =
            ref.query().sort(BbbMeta.get().key.desc).getModelList();
        assertThat(models.size(), is(2));
        assertThat(models.get(0).getKey(), is(bbb2.getKey()));
        assertThat(models.get(1).getKey(), is(bbb.getKey()));
        assertThat(ref.getModelList(), is(sameInstance(models)));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void queryWithInMemorySort() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models =
            ref.query().sortInMemory(BbbMeta.get().key.desc).getModelList();
        assertThat(models.size(), is(2));
        assertThat(models.get(0).getKey(), is(bbb2.getKey()));
        assertThat(models.get(1).getKey(), is(bbb.getKey()));
        assertThat(ref.getModelList(), is(sameInstance(models)));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void queryWithFilter() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models =
            ref
                .query()
                .filter(BbbMeta.get().key.equal(bbb.getKey()))
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void queryWithInMemoryFilter() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models =
            ref
                .query()
                .filterInMemory(BbbMeta.get().key.equal(bbb.getKey()))
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void queryWithLimit() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models = ref.query().limit(1).getModelList();
        assertThat(models.size(), is(1));
        assertThat(models.get(0).getKey(), is(bbb.getKey()));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Bbb

     * @throws Exception
     */
    @Test
    public void queryWithOffset() throws Exception {
        Datastore.put(hoge);
        Bbb bbb = new Bbb();
        bbb.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb);
        Bbb bbb2 = new Bbb();
        bbb2.getHoge2Ref().setModel(hoge);
        Datastore.put(bbb2);
        List<Bbb> models = ref.query().offset(1).getModelList();
        assertThat(models.size(), is(1));
        assertThat(models.get(0).getKey(), is(bbb2.getKey()));
    }
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.