Package org.drools.process.command

Examples of org.drools.process.command.InsertObjectCommand


        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext context) {
            InsertObjectCommand cmd = (InsertObjectCommand) object;
            if ( cmd.getOutIdentifier() != null ) {
                writer.addAttribute( "out-identifier",
                                     cmd.getOutIdentifier() );
            }
            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 );
            }
            return cmd;
        }
View Full Code Here

        this.outIdentifier = outIdentifier;
    }

    public void receive(Object object,
                        PipelineContext context) {
        InsertObjectCommand cmd = new InsertObjectCommand( object );
        if ( outIdentifier != null ) {
            cmd.setOutIdentifier( this.outIdentifier );
        }

        emit( cmd,
              context );
    }
View Full Code Here

    public Command newInsertElements(Iterable objects) {
        return new InsertElementsCommand( objects );
    }

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

        return new InsertObjectCommand( object );
    }

    public Command newInsertObject(Object object,
                                   String outIdentifier) {
        InsertObjectCommand cmd = new InsertObjectCommand( object );
        cmd.setOutIdentifier( outIdentifier );
        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

  public void halt() {
    throw new UnsupportedOperationException();
  }

  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

    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.process.command.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.