Package org.drools.runtime.rule

Examples of org.drools.runtime.rule.FactHandle


        }

        public void marshal(Object object,
                            HierarchicalStreamWriter writer,
                            MarshallingContext marshallingContext) {
            FactHandle fh = (FactHandle) object;
            writer.startNode( "external-form" );
            writer.setValue( fh.toExternalForm() );
            writer.endNode();
        }
View Full Code Here


            }
        }

        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
            FactHandle factHandle = null;
            String outIdentifier = null;
            while ( reader.hasMoreChildren() ) {
                reader.moveDown();
                String name = reader.getNodeName();
                if ( "fact-handle".equals( name ) ) {
View Full Code Here

        }

        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
            reader.moveDown();
            FactHandle factHandle = new DefaultFactHandle( reader.getValue() );
            reader.moveUp();

            Command cmd = CommandFactory.newRetract( factHandle );

            return cmd;
View Full Code Here

        }

        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
            reader.moveDown();
            FactHandle factHandle = new DefaultFactHandle( reader.getValue() );
            reader.moveUp();

            List<Setter> setters = new ArrayList();
            while ( reader.hasMoreChildren() ) {
                reader.moveDown();
View Full Code Here

      for ( QueryResultsRow result : results ) {
          writer.startNode( "row" );
          for ( int i = 0; i < identifiers.length; i++ ) {
              Object value = result.get( identifiers[i] );
              FactHandle factHandle = result.getFactHandle( identifiers[i] );
              writeItem( value,
                         context,
                         writer );
              writer.startNode( "fact-handle" );
              writer.addAttribute( "external-form",
View Full Code Here

                                        context,
                                        null );
              reader.moveUp();

              reader.moveDown();
              FactHandle handle = new DefaultFactHandle( reader.getAttribute( "external-form" ) );
              reader.moveUp();

              objects.add( object );
              handles.add( handle );
          }
View Full Code Here

  }

  public void marshal(Object object,
                      HierarchicalStreamWriter writer,
                      MarshallingContext marshallingContext) {
      FactHandle fh = (FactHandle) object;
      //writer.startNode("fact-handle");
      writer.addAttribute( "external-form",
                           fh.toExternalForm() );
      //writer.endNode();
  }
View Full Code Here

      }
  }

  public Object unmarshal(HierarchicalStreamReader reader,
                          UnmarshallingContext context) {
      FactHandle factHandle = new DefaultFactHandle( reader.getAttribute( "fact-handle" ) );

      List<Setter> setters = new ArrayList();
      while ( reader.hasMoreChildren() ) {
          reader.moveDown();
          Setter setter = CommandFactory.newSetter( reader.getAttribute( "accessor" ),
View Full Code Here

                           cmd.getFactHandle().toExternalForm() );
  }

  public Object unmarshal(HierarchicalStreamReader reader,
                          UnmarshallingContext context) {
      FactHandle factHandle = new DefaultFactHandle( reader.getAttribute( "fact-handle" ) );

      return CommandFactory.newRetract( factHandle );
  }
View Full Code Here

      }
  }

  public Object unmarshal(HierarchicalStreamReader reader,
                          UnmarshallingContext context) {
      FactHandle factHandle = new DefaultFactHandle( reader.getAttribute( "fact-handle" ) );
      String identifierOut = reader.getAttribute( "out-identifier" );

      GetObjectCommand cmd = new GetObjectCommand( factHandle );
      if ( identifierOut != null ) {
          cmd.setOutIdentifier( identifierOut );
View Full Code Here

TOP

Related Classes of org.drools.runtime.rule.FactHandle

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.