Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.RuleRepository


        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

        List<RuleRepository> activeRules = ruleRepositoryService.findActiveRuleRepositories();

        for (Iterator<RuleRepository> iterator = activeRules.iterator(); iterator.hasNext();) {
        RuleRepository ruleRepository = (RuleRepository) iterator.next();
        String ruleDRL = ruleRepository.getRuleString().toString();
        Resource ruleResource = ResourceFactory.newReaderResource((Reader) new StringReader(ruleDRL));
        kbuilder.add(ruleResource, ResourceType.DRL);
      }

      if (kbuilder.hasErrors()) {
View Full Code Here


  public RuleRepository getRuleRepositoryByCode(String ruleConditionRepositoryCode) {
    Session session = (Session) em.getDelegate();
    String sql = "FROM RuleRepository WHERE upper(code) = upper(:code)";
    Query query = session.createQuery(sql);
    query.setString("code", ruleConditionRepositoryCode);
    RuleRepository ruleRepository = (RuleRepository) query.uniqueResult();
    return ruleRepository;
  }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.RuleRepository

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.