Codota Logo
DomainObject.setInterval
Code IndexAdd Codota to your IDE (free)

How to use
setInterval
method
in
org.drools.compiler.DomainObject

Best Java code snippets using org.drools.compiler.DomainObject.setInterval (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.drools/drools-compiler

@Test
public void testQueryWithEval() throws IOException, ClassNotFoundException {
  // [Regression in 5.2.0.M2]: NPE during rule evaluation on MVELPredicateExpression.evaluate(MVELPredicateExpression.java:82)
  String str = "package org.drools.compiler.integrationtests\n" +
         "import " + DomainObject.class.getCanonicalName() + " \n" +
         "query queryWithEval \n" +
         "    $do: DomainObject()\n" +
         "    not DomainObject( id == $do.id, eval(interval.isAfter($do.getInterval())))\n" +
         "end";
  KieBase kbase = SerializationHelper.serializeObject(loadKnowledgeBaseFromString(str));
  KieSession ksession = createKieSession( kbase );
  DomainObject do1 = new DomainObject();
  do1.setId( 1 );
  do1.setInterval( new Interval( 10,
                  5 ) );
  DomainObject do2 = new DomainObject();
  do2.setId( 1 );
  do2.setInterval( new Interval( 20,
                  5 ) );
  ksession.insert( do1 );
  ksession.insert( do2 );
  org.kie.api.runtime.rule.QueryResults results = ksession.getQueryResults( "queryWithEval" );
  assertEquals( 1,
         results.size() );
  assertEquals( do2,
         results.iterator().next().get( "$do" ) );
  ksession.dispose();
}
origin: org.drools/drools-reteoo

do1.setInterval( new Interval( 10,
                5 ) );
DomainObject do2 = new DomainObject();
do2.setId( 1 );
do2.setInterval( new Interval( 20,
                5 ) );
ksession.insert( do1 );
org.drools.compilerDomainObjectsetInterval

Popular methods of DomainObject

  • <init>
  • setId
  • setHashKey

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onRequestPermissionsResult (Fragment)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now