congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
InsertObjectCommand.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.drools.command.runtime.rule.InsertObjectCommand
constructor

Best Java code snippets using org.drools.command.runtime.rule.InsertObjectCommand.<init> (Showing top 10 results out of 315)

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public Command newInsert(Object object) {
  return new InsertObjectCommand(object);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public InsertObjectCommand createInsertObjectCommand() {
  return new InsertObjectCommand();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public FactHandle insert(Object object) {
  return commandService.execute( new InsertObjectCommand( object ) );
}
origin: org.drools/drools-grid-impl

public FactHandle insert(Object object) {
  String kresultsId = "kresults_" + this.gsd.getId();
  CommandImpl cmd = new CommandImpl( "execute",
                    Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( new InsertObjectCommand( object,
                                                                      true ),
                                                         null,
                                                         null,
                                                         this.instanceId,
                                                         kresultsId )} ) );
  Object result = this.sendMessage(cmd);
  return (FactHandle) result;
}
origin: apache/servicemix

public void insertAndFireAll(Exchange exchange) {
  final Message in = exchange.getIn();
  final Object body = in.getBody();
  // TODO: add type checking to handle arrays of objects
  BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();
  final List<GenericCommand<?>> commands = command.getCommands();
  commands.add(new InsertObjectCommand(body, "obj1"));
  commands.add(new FireAllRulesCommand());
  in.setBody(command);
}
origin: apache/servicemix

public void insertAndFireAll(Exchange exchange) {
  final Message in = exchange.getIn();
  final Object body = in.getBody();
  // TODO: add type checking to handle arrays of objects
  BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();
  final List<GenericCommand<?>> commands = command.getCommands();
  commands.add(new InsertObjectCommand(body, "obj1"));
  commands.add(new FireAllRulesCommand());
  in.setBody(command);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public Command newInsert(Object object, String outIdentifier, boolean returnObject, String entryPoint) {
  InsertObjectCommand cmd = new InsertObjectCommand(object);
  cmd.setOutIdentifier(outIdentifier);
  cmd.setEntryPoint( entryPoint );
  cmd.setReturnObject( returnObject );
  return cmd;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public Object unmarshal(HierarchicalStreamReader reader,
            UnmarshallingContext context) {
  InsertObjectCommand cmd = new InsertObjectCommand();
  while ( reader.hasMoreChildren() ) {
    reader.moveDown();
    String nodeName = reader.getNodeName();
    if ( "out-identifier".equals( nodeName ) ) {
      cmd.setOutIdentifier( reader.getValue() );
    } else if ( "return-object".equals( nodeName ) ) {
      cmd.setReturnObject( Boolean.parseBoolean( reader.getValue() ) );
    } else if ( "object".equals( nodeName ) ) {
      cmd.setObject( readValue( reader,
                   context,
                   cmd.getObject(),
                   "object" ) );
    } else if ( "entry-point".equals( nodeName ) ) {
      cmd.setEntryPoint( reader.getValue() );
    }
    reader.moveUp();
  }
  return cmd;
}
origin: org.drools/drools-grid-impl

public FactHandle insert(Object object) throws FactException {
  String kresultsId = "kresults_" + this.gsd.getId();
  InsertObjectCommand insertCmd = new InsertObjectCommand( object,
                               true );
  insertCmd.setEntryPoint( name );
  CommandImpl cmd = new CommandImpl( "execute",
                    Arrays.asList( new Object[]{new KnowledgeContextResolveFromContextCommand( insertCmd,
                                                         null,
                                                         null,
                                                         this.instanceId,
                                                         this.name,
                                                         kresultsId )} ) );
  Object result = ConversationUtil.sendMessage( this.cm,
                         (InetSocketAddress) this.gsd.getAddresses().get( "socket" ).getObject(),
                         this.gsd.getId(),
                         cmd );
  return ((FactHandle) result);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public Object unmarshal(HierarchicalStreamReader reader,
            UnmarshallingContext context) {
  String identifierOut = reader.getAttribute( "out-identifier" );
  String returnObject = reader.getAttribute( "return-object" );
  String entryPoint = reader.getAttribute( "entry-point" );
  reader.moveDown();
  Object object = readItem( reader,
               context,
               null );
  reader.moveUp();
  InsertObjectCommand cmd = new InsertObjectCommand( object );
  if ( identifierOut != null ) {
    cmd.setOutIdentifier( identifierOut );
    if ( returnObject != null ) {
      cmd.setReturnObject( Boolean.parseBoolean( returnObject ) );
    }
  }
  if ( entryPoint != null ) {
    cmd.setEntryPoint( entryPoint );
  }
  return cmd;
}
org.drools.command.runtime.ruleInsertObjectCommand<init>

Popular methods of InsertObjectCommand

  • setEntryPoint
  • getEntryPoint
  • getObject
  • getOutIdentifier
  • isReturnObject
  • setObject
  • setOutIdentifier
  • setReturnObject

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • String (java.lang)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 17 Free Sublime Text Plugins
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