Created
December 15, 2011 08:52
-
-
Save ge0ffrey/1480413 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void testQueryPositional() throws Exception { | |
| String str = "" + | |
| "package org.drools.test \n" + | |
| "import org.drools.Person \n" + | |
| "global java.util.List list\n" + | |
| "query peeps( String $name, String $likes, int $age ) \n" + | |
| " Person( $name := name, $likes := likes, $age := age; ) \n"+ | |
| "end\n"; | |
| ... | |
| } | |
| maybe becomes: | |
| public void testQueryPositional() throws Exception { | |
| DrlBuilder b = new DrlBuilder(); | |
| b.package("org.drools.test"); | |
| b.import("org.drools.Person"); | |
| b.global("java.util.List list"); | |
| ... // We'd better use Edson's fluent API directly? | |
| ... | |
| } | |
| Idunno, not sure if this is a good idea any more. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment