congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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