Package org.slim3.datastore.model

Examples of org.slim3.datastore.model.Hoge


     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByContainsCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here


     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByEndsWithCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByIsNotNullCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByLessThanCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByLessThanOrEqualCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByNotEqualCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

     * @throws Exception
     */
    @Test
    public void asListAndFilterInMemoryByStartsWithCriterionOfCipherText()
            throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyCipherText(new Text("1102"));
        hoge2.setMyCipherText(new Text("1103"));
        hoge3.setMyCipherText(new Text("1104"));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

    /**
     * @throws Exception
     */
    @Test
    public void and() throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyString("aaa");
        hoge2.setMyString("aaa");
        hoge3.setMyString("bbb");
        hoge1.setMyInteger(1);
        hoge2.setMyInteger(2);
        hoge3.setMyInteger(3);
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

    /**
     * @throws Exception
     */
    @Test
    public void or() throws Exception {
        Hoge hoge1 = new Hoge();
        Hoge hoge2 = new Hoge();
        Hoge hoge3 = new Hoge();
        hoge1.setMyString("aaa");
        hoge2.setMyString("aaa");
        hoge3.setMyString("bbb");
        hoge1.setMyInteger(1);
        hoge2.setMyInteger(2);
        hoge3.setMyInteger(3);
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge1));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge2));
        DatastoreUtil.put(ds, null, DatastoreUtil.modelToEntity(ds, hoge3));
        List<Hoge> list =
            new ModelQuery<Hoge>(ds, meta)
View Full Code Here

     */
    @Test
    public void compare() throws Exception {
        AttributeComparator comparator =
            new AttributeComparator(meta.myInteger.asc, meta.myString.desc);
        Hoge hoge = new Hoge();
        hoge.setMyInteger(1);
        hoge.setMyString("aaa");
        assertThat(comparator.compare(hoge, hoge), is(0));
        Hoge hoge2 = new Hoge();
        hoge2.setMyInteger(2);
        hoge2.setMyString("bbb");
        assertThat(comparator.compare(hoge, hoge2), is(-1));
        assertThat(comparator.compare(hoge2, hoge), is(1));
        hoge2.setMyInteger(1);
        assertThat(comparator.compare(hoge, hoge2), is(1));
    }
View Full Code Here

TOP

Related Classes of org.slim3.datastore.model.Hoge

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.