Codota Logo
FromEntryPointFactPattern
Code IndexAdd Codota to your IDE (free)

How to use
FromEntryPointFactPattern
in
org.drools.ide.common.client.modeldriven.brl

Best Java code snippets using org.drools.ide.common.client.modeldriven.brl.FromEntryPointFactPattern (Showing top 8 results out of 315)

  • Common ways to obtain FromEntryPointFactPattern
private void myMethod () {
FromEntryPointFactPattern f =
  • Codota Iconnew FromEntryPointFactPattern()
  • Smart code suggestions by Codota
}
origin: org.drools/droolsjbpm-ide-common

public void visitFromEntryPointFactPattern( FromEntryPointFactPattern pattern,
                      boolean isSubPattern ) {
  buf.append( indentation );
  if ( !isSubPattern && isDSLEnhanced ) {
    // adding passthrough markup
    buf.append( ">" );
  }
  if ( pattern.getFactPattern() != null ) {
    generateFactPattern( pattern.getFactPattern() );
  }
  buf.append( " from entry-point \"" + pattern.getEntryPointName() + "\"\n" );
}
origin: org.drools/droolsjbpm-ide-common

  fp.setWindow( pattern.getWindow() );
  if ( pattern.getEntryPointName() != null && pattern.getEntryPointName().length() > 0 ) {
    FromEntryPointFactPattern fep = new FromEntryPointFactPattern();
    fep.setEntryPointName( pattern.getEntryPointName() );
    fep.setFactPattern( fp );
    patterns.add( fep );
    ifp = fep;
} else if ( ifp instanceof FromEntryPointFactPattern ) {
  FromEntryPointFactPattern fep = (FromEntryPointFactPattern) ifp;
  fp = fep.getFactPattern();
} else {
  throw new IllegalArgumentException( "Inexpected IFactPattern implementation found." );
origin: org.drools/droolsjbpm-ide-common

@Test
public void testFromCollectWithEmbeddedFromEntryPoint() {
  RuleModel m = new RuleModel();
  m.name = "r1";
  SingleFieldConstraint sfc = new SingleFieldConstraint( "bar" );
  sfc.setFactType( SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER );
  sfc.setFieldBinding( "$a" );
  sfc.setOperator( "==" );
  sfc.setValue( "777" );
  FactPattern fp = new FactPattern( "Foo" );
  fp.addConstraint( sfc );
  FromEntryPointFactPattern fep = new FromEntryPointFactPattern();
  fep.setEntryPointName( "ep" );
  fep.setFactPattern( fp );
  FromCollectCompositeFactPattern fac = new FromCollectCompositeFactPattern();
  fac.setRightPattern( fep );
  fac.setFactPattern( new FactPattern( "java.util.List" ) );
  m.addLhsItem( fac );
  String actual = BRDRLPersistence.getInstance().marshal( m );
  String expected = "rule \"r1\"\n"
      + "dialect \"mvel\"\n"
      + "when\n"
      + "java.util.List( ) from collect ( Foo( $a : bar == 777 ) from entry-point \"ep\" ) \n"
      + "then\n"
      + "end";
  assertEqualsIgnoreWhitespace( expected,
                 actual );
}
origin: org.drools/droolsjbpm-ide-common

private IPattern findByFactPattern(List<IPattern> patterns,
                  String boundName) {
  if ( boundName == null ) {
    return null;
  }
  for ( IPattern ifp : patterns ) {
    if ( ifp instanceof FactPattern ) {
      FactPattern fp = (FactPattern) ifp;
      if ( fp.getBoundName() != null && fp.getBoundName().equals( boundName ) ) {
        return fp;
      }
    } else if ( ifp instanceof FromEntryPointFactPattern ) {
      FromEntryPointFactPattern fefp = (FromEntryPointFactPattern) ifp;
      FactPattern fp = fefp.getFactPattern();
      if ( fp.getBoundName() != null && fp.getBoundName().equals( boundName ) ) {
        return fp;
      }
    }
  }
  return null;
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

  fp.setWindow( pattern.getWindow() );
  if ( pattern.getEntryPointName() != null && pattern.getEntryPointName().length() > 0 ) {
    FromEntryPointFactPattern fep = new FromEntryPointFactPattern();
    fep.setEntryPointName( pattern.getEntryPointName() );
    fep.setFactPattern( fp );
    patterns.add( fep );
    ifp = fep;
} else if ( ifp instanceof FromEntryPointFactPattern ) {
  FromEntryPointFactPattern fep = (FromEntryPointFactPattern) ifp;
  fp = fep.getFactPattern();
} else {
  throw new IllegalArgumentException( "Inexpected IFactPattern implementation found." );
origin: org.drools/droolsjbpm-ide-common

@Test
public void testFromAccumulateWithEmbeddedFromEntryPoint() {
  RuleModel m = new RuleModel();
  m.name = "r1";
  SingleFieldConstraint sfc = new SingleFieldConstraint( "bar" );
  sfc.setFactType( SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER );
  sfc.setFieldBinding( "$a" );
  sfc.setOperator( "==" );
  sfc.setValue( "777" );
  FactPattern fp = new FactPattern( "Foo" );
  fp.addConstraint( sfc );
  FromEntryPointFactPattern fep = new FromEntryPointFactPattern();
  fep.setEntryPointName( "ep" );
  fep.setFactPattern( fp );
  FromAccumulateCompositeFactPattern fac = new FromAccumulateCompositeFactPattern();
  fac.setSourcePattern( fep );
  fac.setFactPattern( new FactPattern( "java.util.List" ) );
  fac.setFunction( "max($a)" );
  m.addLhsItem( fac );
  String actual = BRDRLPersistence.getInstance().marshal( m );
  String expected = "rule \"r1\"\n"
      + "dialect \"mvel\"\n"
      + "when\n"
      + "java.util.List( ) from accumulate ( Foo( $a : bar == 777 ) from entry-point \"ep\", \n"
      + "max($a))\n"
      + "then\n"
      + "end";
  assertEqualsIgnoreWhitespace( expected,
                 actual );
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

private IPattern findByFactPattern(List<IPattern> patterns,
                  String boundName) {
  if ( boundName == null ) {
    return null;
  }
  for ( IPattern ifp : patterns ) {
    if ( ifp instanceof FactPattern ) {
      FactPattern fp = (FactPattern) ifp;
      if ( fp.getBoundName() != null && fp.getBoundName().equals( boundName ) ) {
        return fp;
      }
    } else if ( ifp instanceof FromEntryPointFactPattern ) {
      FromEntryPointFactPattern fefp = (FromEntryPointFactPattern) ifp;
      FactPattern fp = fefp.getFactPattern();
      if ( fp.getBoundName() != null && fp.getBoundName().equals( boundName ) ) {
        return fp;
      }
    }
  }
  return null;
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

public void visitFromEntryPointFactPattern( FromEntryPointFactPattern pattern,
                      boolean isSubPattern ) {
  buf.append( indentation );
  if ( !isSubPattern && isDSLEnhanced ) {
    // adding passthrough markup
    buf.append( ">" );
  }
  if ( pattern.getFactPattern() != null ) {
    generateFactPattern( pattern.getFactPattern() );
  }
  buf.append( " from entry-point \"" + pattern.getEntryPointName() + "\"\n" );
}
org.drools.ide.common.client.modeldriven.brlFromEntryPointFactPattern

Most used methods

  • <init>
  • setEntryPointName
  • setFactPattern
  • getEntryPointName
  • getFactPattern

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
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