Tabnine Logo
Declaration.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.drools.core.rule.Declaration
constructor

Best Java code snippets using org.drools.core.rule.Declaration.<init> (Showing top 20 results out of 315)

origin: org.drools/drools-compiler

final Declaration[] declarations = new Declaration[]{new Declaration( "name",
                                   null,
                                   null ), new Declaration( "age",
                                                null,
                                                null )};
final Declaration[] inner = new Declaration[]{new Declaration( "cheese",
                                new PatternExtractor( new ClassObjectType( Cheese.class ) ),
                                null ), new Declaration( "price",
                                            store.getReader( Cheese.class,
                                                     "price" ),
origin: org.drools/drools-compiler

final Declaration[] declarations = new Declaration[]{new Declaration( "name",
                                   store.getReader( Person.class,
                                            "name" ),
                                   null ), new Declaration( "age",
                                                store.getReader( Person.class,
                                                        "age" ),
                                                null )};
final Declaration[] inner = new Declaration[]{new Declaration( "$cheese",
                                new PatternExtractor( new ClassObjectType( Cheese.class ) ),
                                null ), new Declaration( "$person",
                                            new PatternExtractor( new ClassObjectType( Person.class ) ),
                                            null )};
origin: org.drools/drools-core

protected BetaNodeFieldConstraint getConstraint(String identifier,
                        Operator operator,
                        String fieldName,
                        Class clazz) {
  ClassFieldAccessorStore store = new ClassFieldAccessorStore();
  store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) );
  store.setEagerWire( true );
  InternalReadAccessor extractor = store.getReader( clazz,
                           fieldName );
  Declaration declaration = new Declaration( identifier,
                        extractor,
                        new Pattern( 0,
                              new ClassObjectType( clazz ) ) );
  String expression = fieldName + " " + operator.getOperatorString() + " " + declaration.getIdentifier();
  return new MvelConstraintTestUtil(expression, declaration, extractor);
}
origin: org.drools/drools-core

protected BetaNodeFieldConstraint getConstraint(String identifier,
                        Operator operator,
                        String fieldName,
                        Class clazz) {
  ClassFieldAccessorStore store = new ClassFieldAccessorStore();
  store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) );
  store.setEagerWire( true );
  InternalReadAccessor extractor = store.getReader( clazz,
                           fieldName );
  Declaration declaration = new Declaration( identifier,
                        extractor,
                        new Pattern( 0,
                              new ClassObjectType( clazz ) ) );
  String expression = fieldName + " " + operator.getOperatorString() + " " + identifier;
  return new MvelConstraintTestUtil(expression, operator.getOperatorString(), declaration, extractor);
}
origin: org.drools/drools-core

protected BetaNodeFieldConstraint getConstraint(String identifier,
                        Operator operator,
                        String fieldName,
                        Class clazz) {
  ClassFieldAccessorStore store = new ClassFieldAccessorStore();
  store.setClassFieldAccessorCache( new ClassFieldAccessorCache( Thread.currentThread().getContextClassLoader() ) );
  store.setEagerWire( true );
  InternalReadAccessor extractor = store.getReader( clazz,
                           fieldName );
  Declaration declaration = new Declaration( identifier,
                        extractor,
                        new Pattern( 0,
                              new ClassObjectType( clazz ) ) );
  String expression = fieldName + " " + operator.getOperatorString() + " " + declaration.getIdentifier();
  return new MvelConstraintTestUtil(expression, declaration, extractor);
}

origin: org.drools/drools-core

@Test
public void testGetFieldValue() {
  final InternalReadAccessor extractor = store.getReader( Cheese.class,
                              "type" );
  final Pattern pattern = new Pattern( 5,
                     new ClassObjectType( Cheese.class ) );
  // Bind the extractor to a decleration 
  // Declarations know the pattern they derive their value from 
  final Declaration declaration = new Declaration( "typeOfCheese",
                           extractor,
                           pattern );
  // Create some facts
  final Cheese cheddar = new Cheese( "cheddar",
                    5 );
  // Check we can extract Declarations correctly
  assertEquals( "cheddar",
         declaration.getValue( null,
                    cheddar ) );
}
origin: org.drools/drools-core

                 new FactTemplateObjectType( cheese ) );
final Declaration declaration = new Declaration( "typeOfCheese",
                         extractName,
                         pattern );
origin: org.drools/drools-core

                       new Declaration("id", extractor, null) ,
                       MvelConstraint.INDEX_EVALUATOR );
final SingleIndex singleIndex = new SingleIndex( new FieldIndex[]{fieldIndex},
origin: org.drools/drools-core

@Test
public void testEmptyIterator() {
  final InternalReadAccessor extractor = store.getReader( Cheese.class,
                              "type" );
  final Pattern pattern = new Pattern( 0,
                     new ClassObjectType( Cheese.class ) );
  final Declaration declaration = new Declaration( "typeOfCheese",
                           extractor,
                           pattern );
  final FieldIndex fieldIndex = new FieldIndex( extractor,
                         declaration,
                         MvelConstraint.INDEX_EVALUATOR );
  final TupleIndexHashTable map = new TupleIndexHashTable( new FieldIndex[]{fieldIndex}, false );
  final Cheese stilton = new Cheese( "stilton",
                    55 );
  final InternalFactHandle stiltonHandle = new DefaultFactHandle( 2,
                                  stilton );
  assertNull( map.getFirst( new LeftTupleImpl( stiltonHandle, null, true ) ) );
}
origin: org.drools/drools-compiler

                         leftFieldName);
Declaration declr = new Declaration(leftVariableName,
                  extractor,
                  pattern);
origin: org.drools/drools-core

@Test
public void testDeclaration() {
  final InternalReadAccessor extractor = store.getReader( Cheese.class,
                              "type" );
  final Pattern pattern = new Pattern( 5,
                     new ClassObjectType( Cheese.class ) );
  // Bind the extractor to a decleration
  // Declarations know the pattern they derive their value from
  final Declaration declaration = new Declaration( "typeOfCheese",
                           extractor,
                           pattern );
  assertEquals( "typeOfCheese",
         declaration.getIdentifier() );
  assertSame( String.class,
        declaration.getDeclarationClass() );
  assertSame( extractor,
        declaration.getExtractor() );
  assertEquals( 5,
         declaration.getPattern().getOffset() );
}
origin: org.drools/drools-compiler

final Declaration declaration = new Declaration( "p",
                         extractor,
                         pattern );
origin: org.drools/drools-compiler

final Declaration declaration = new Declaration( "cheese",
                         extractor,
                         pattern );
origin: org.drools/drools-core

                             "type" );
final FieldIndex fieldIndex = new FieldIndex( extractor,
                       new Declaration("id", extractor, null) ,
                       MvelConstraint.INDEX_EVALUATOR );
final SingleIndex singleIndex = new SingleIndex( new FieldIndex[]{fieldIndex},
origin: org.drools/drools-compiler

final Declaration declaration = new Declaration( "a",
                         extractor,
                         pattern );
origin: org.drools/drools-core

                   new ClassObjectType( Cheese.class ) );
final Declaration declaration = new Declaration( "typeOfCheese",
                         extractor,
                         pattern );
origin: org.drools/drools-core

                   new ClassObjectType( Cheese.class ) );
final Declaration declaration = new Declaration( "typeOfCheese",
                         extractor,
                         pattern );
origin: org.drools/drools-core

                   new ClassObjectType( Cheese.class ) );
final Declaration declaration = new Declaration( "typeOfCheese",
                         extractor,
                         pattern );
origin: org.drools/drools-core

                   new ClassObjectType( TestClass.class ) );
final Declaration declaration = new Declaration( "theObject",
                         extractor,
                         pattern );
origin: org.drools/drools-core

                   new ClassObjectType( Cheese.class ) );
final Declaration declaration = new Declaration( "typeOfCheese",
                         extractor,
                         pattern );
org.drools.core.ruleDeclaration<init>

Popular methods of Declaration

  • getIdentifier
  • getValue
  • getDeclarationClass
  • getExtractor
  • getIntValue
  • getPattern
  • getTypeName

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Option (scala)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now