Package org.kie.runtime.rule

Examples of org.kie.runtime.rule.FactHandle


        }
        if (disconnected) {
            ExecutionResultImpl disconnectedResults = new ExecutionResultImpl();
            HashMap<String, Object> disconnectedHandles = new HashMap<String, Object>();
            for (String key : kresults.getIdentifiers()) {
                FactHandle handle = (FactHandle) kresults.getFactHandle(key);
                if (handle != null) {
                    DefaultFactHandle disconnectedHandle = ((DefaultFactHandle) handle).clone();
                    disconnectedHandle.disconnect();
                    disconnectedHandles.put(key, disconnectedHandle);
                }
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.newDelete(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

        }

        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.newDelete(factHandle);

            return cmd;
View Full Code Here

TOP

Related Classes of org.kie.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.