Package org.drools.runtime.rule.impl

Examples of org.drools.runtime.rule.impl.NativeQueryResults


        return new NativeQueryResults( this.session.getQueryResults( query ) );
    }

    public QueryResults getQueryResults(String query,
                                        Object[] arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here


    public RuleBase getRuleBase() {
        return this.kbase.ruleBase;
    }

    public QueryResults getQueryResults(String query) {
        return new NativeQueryResults( this.session.getQueryResults( query ));
    }
View Full Code Here

        return new NativeQueryResults( this.session.getQueryResults( query ));
    }

    public QueryResults getQueryResults(String query,
                                        Object[] arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query, arguments ) );
    }
View Full Code Here

        return ((KnowledgeBaseImpl) this.kbase).ruleBase;
    }

    public QueryResults getQueryResults(String query,
                                        Object... arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here

        return ((KnowledgeBaseImpl) this.kbase).ruleBase;
    }

    public QueryResults getQueryResults(String query,
                                        Object... arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here

        return ((KnowledgeBaseImpl) this.kbase).ruleBase;
    }

    public QueryResults getQueryResults(String query,
                                        Object... arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here

        return ((KnowledgeBaseImpl) this.kbase).ruleBase;
    }

    public QueryResults getQueryResults(String query,
                                        Object... arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here

    if (obj instanceof FactHandle && !(obj instanceof DisconnectedFactHandle)) {
      return new DisconnectedFactHandle(((FactHandle) obj).toExternalForm());
    }
   
    if (obj instanceof NativeQueryResults) {
      NativeQueryResults nativeQueryResults = (NativeQueryResults) obj;
            List<Declaration> declrs = new ArrayList<Declaration>();
            HashMap<String, Integer> identifiers = new HashMap<String, Integer>(  );
           
            for ( String identifier : nativeQueryResults.getIdentifiers() ) {
              // we don't want to marshall the query parameters
              Declaration declr = nativeQueryResults.getDeclarations().get( identifier );
              ObjectType objectType = declr.getPattern().getObjectType();
              if ( objectType instanceof ClassObjectType &&
                ((ClassObjectType) objectType).getClassType() == DroolsQuery.class ) {
                  continue;
              }
              declrs.add(declr);
              identifiers.put(identifier, declrs.size() - 1);
            }
           
            ArrayList<ArrayList<Object>> results = new ArrayList<ArrayList<Object>>( nativeQueryResults.size() );
            ArrayList<ArrayList<org.drools.runtime.rule.FactHandle>> factHandles = new ArrayList<ArrayList<org.drools.runtime.rule.FactHandle>> ( nativeQueryResults.size() );
            for (QueryResultsRow row : nativeQueryResults) {
              ArrayList<Object> objectList = new ArrayList<Object>();
                ArrayList<org.drools.runtime.rule.FactHandle> factHandleList = new ArrayList<org.drools.runtime.rule.FactHandle>();
                for (int i = 0; i < declrs.size(); i++) {
                  objectList.add(convert(row.get(declrs.get(i).getIdentifier())));
View Full Code Here

        return ((KnowledgeBaseImpl) this.kbase).ruleBase;
    }

    public QueryResults getQueryResults(String query,
                                        Object... arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here

        return ((KnowledgeBaseImpl) this.kbase).ruleBase;
    }

    public QueryResults getQueryResults(String query,
                                        Object... arguments) {
        return new NativeQueryResults( this.session.getQueryResults( query,
                                                                     arguments ) );
    }
View Full Code Here

TOP

Related Classes of org.drools.runtime.rule.impl.NativeQueryResults

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.