Package org.drools.command.runtime.rule

Examples of org.drools.command.runtime.rule.InsertObjectCommand


        getSim().addCommand( new FireAllRulesCommand() );
        return this;
    }

    public FluentCompactStatefulKnowledgeSession insert(Object object) {
        getSim().addCommand( new InsertObjectCommand( object ) );
        return this;
    }
View Full Code Here


        getSim().addCommand( new SetGlobalCommand( identifier, object ) );
        return this;
    }   
   
    public FluentStandardStatefulKnowledgeSession insert(Object object) {
        getSim().addCommand( new InsertObjectCommand( object ) );
       
        return this;
    }
View Full Code Here

    public void halt() {
        this.commandService.execute( new HaltCommand() );
    }

    public FactHandle insert(Object object) {
        return commandService.execute( new InsertObjectCommand( object ) );
    }
View Full Code Here

    public void halt() {
        this.commandService.execute( new HaltCommand() );
    }

    public FactHandle insert(Object object) {
        return commandService.execute( new InsertObjectCommand( object ) );
    }
View Full Code Here

        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext context) {
            InsertObjectCommand cmd = (InsertObjectCommand) object;
            if ( cmd.getOutIdentifier() != null ) {
                writer.addAttribute( "out-identifier",
                                     cmd.getOutIdentifier() );

                writer.addAttribute( "return-object",
                                     Boolean.toString( cmd.isReturnObject() ) );

            }
            writeItem( cmd.getObject(),
                       context,
                       writer );
        }
View Full Code Here

            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 ) );
                }
            }
            return cmd;
        }
View Full Code Here

    // 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);
  }
View Full Code Here

        cmd.setReturnObject( returnObject );
        return cmd;
    }

    public Command newInsert(Object object) {
        return new InsertObjectCommand(object);
    }
View Full Code Here

    public Command newInsert(Object object) {
        return new InsertObjectCommand(object);
    }

    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;
    }
View Full Code Here

    public void halt() {
        this.commandService.execute( new HaltCommand() );
    }

    public FactHandle insert(Object object) {
        return commandService.execute( new InsertObjectCommand( object ) );
    }
View Full Code Here

TOP

Related Classes of org.drools.command.runtime.rule.InsertObjectCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.