Package com.mysema.query.types.path

Examples of com.mysema.query.types.path.StringPath.prepend()


        assertEquals(".*abc$", regex(ConstantImpl.create("%abc")));
        assertEquals("^.$",  regex(ConstantImpl.create("_")));
       
        StringPath path = new StringPath("path");
        assertEquals("path + .*", regex(path.append("%")));
        assertEquals(".* + path", regex(path.prepend("%")));
        assertEquals("path + .", regex(path.append("_")));
        assertEquals(". + path", regex(path.prepend("_")));              
    }
   
    @Test
View Full Code Here


       
        StringPath path = new StringPath("path");
        assertEquals("path + .*", regex(path.append("%")));
        assertEquals(".* + path", regex(path.prepend("%")));
        assertEquals("path + .", regex(path.append("_")));
        assertEquals(". + path", regex(path.prepend("_")));              
    }
   
    @Test
    @Ignore
    public void LikeToRegexSpeed() {
View Full Code Here

            regex(ConstantImpl.create("%"));
            regex(ConstantImpl.create("abc%"));
            regex(ConstantImpl.create("%abc"));
            regex(ConstantImpl.create("_"));
            regex(path.append("%"));
            regex(path.prepend("%"));
            regex(path.append("_"));
            regex(path.prepend("_"));   
        }
        long duration = System.currentTimeMillis() - start;
        System.err.println(duration);
View Full Code Here

            regex(ConstantImpl.create("%abc"));
            regex(ConstantImpl.create("_"));
            regex(path.append("%"));
            regex(path.prepend("%"));
            regex(path.append("_"));
            regex(path.prepend("_"));   
        }
        long duration = System.currentTimeMillis() - start;
        System.err.println(duration);
    }
   
View Full Code Here

        assertEquals("_",  like(ConstantImpl.create(".")));
        assertEquals(".", like(ConstantImpl.create("\\.")));
       
        StringPath path = new StringPath("path");
        assertEquals("path + %", like(path.append(".*")));
        assertEquals("% + path", like(path.prepend(".*")));
        assertEquals("path + _", like(path.append(".")));
        assertEquals("_ + path", like(path.prepend(".")));
    }
   
    @Test(expected=QueryException.class)
View Full Code Here

       
        StringPath path = new StringPath("path");
        assertEquals("path + %", like(path.append(".*")));
        assertEquals("% + path", like(path.prepend(".*")));
        assertEquals("path + _", like(path.append(".")));
        assertEquals("_ + path", like(path.prepend(".")));
    }
   
    @Test(expected=QueryException.class)
    public void RegexToLike_Fail() {
        like(ConstantImpl.create("a*"));
 
View Full Code Here

        long start = System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            like(ConstantImpl.create(".*"));
            like(ConstantImpl.create("."));               
            like(path.append(".*"));
            like(path.prepend(".*"));
            like(path.append("."));
            like(path.prepend("."));   
        }
        long duration = System.currentTimeMillis() - start;
        System.err.println(duration);
View Full Code Here

            like(ConstantImpl.create(".*"));
            like(ConstantImpl.create("."));               
            like(path.append(".*"));
            like(path.prepend(".*"));
            like(path.append("."));
            like(path.prepend("."));   
        }
        long duration = System.currentTimeMillis() - start;
        System.err.println(duration);
    }
   
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.