范围 */
    public static final String CONFIG_ROOT_SCOPE = "scope";
    /** 配置项 - 数据迁移的范围 - 类型ALL(1), PARTIAL_DATABASE(2), PARTIAL_TABLE(3) */
    public static final String CONFIG_ROOT_SCOPE_TYPE = "scopeType";
    /** 配置项 - 数据迁移的范围 - 迁移部分的配置 */
    public static final String CONFIG_ROOT_SCOPE_PARTIAL_TABLE = "partialTable";
    /** 配置项 - select limit */
    public static final String CONFIG_ROOT_SQL_LIMIT = "sqlLimit";

    private DataSourceConfig sourceConfig;

    private DataSourceConfig targetConfig;

    private StartMode starterMode;

    private String jsonPath;

    public WaterGapGlobalConfig(String jsonPath) {
        if (jsonPath == null) { // 没有设置json配置文件
            jsonPath = this.getClass().getResource("/config.json").getPath();
        }
        this.jsonPath = jsonPath;
        init();
    }

    public DataSourceConfig getSourceConfig() {
        return sourceConfig;
    }

    public DataSourceConfig getTargetConfig() {
        return targetConfig;
    }

    public StartMode getStarterMode() {
        return starterMode;
    }

    public void init() {
        JsonParser jsonParser = new JsonParser();
        try {
            JsonObject propJsonObject = jsonParser.parse(new FileReader(jsonPath)).getAsJsonObject();
            sourceConfig = DataSourceConfig.getInstance(propJsonObject.getAsJsonObject(DataSourceConfig.CONFIG_ROOT_SOURCE));
            targetConfig = DataSourceConfig.getInstance(propJsonObject.getAsJsonObject(DataSourceConfig.CONFIG_ROOT_TARGET));
            starterMode = StartMode.valueOf(propJsonObject.get(CONFIG_ROOT_MODE).getAsString());
            setScope(propJsonObject.get(CONFIG_ROOT_SCOPE));
            setExecutorWorkNum(propJsonObject.get(CONFIG_ROOT_THREADNUM));
            setSqlSelectLimit(propJsonObject.get(CONFIG_ROOT_SQL_LIMIT));
        } catch (FileNotFoundException fileNotFoundException) {
            throw new WaterGapException("file not found : " + jsonPath, fileNotFoundException);
        }
    }

}
Playing casino games in the local casinos has become boring to the gamblers. Because gamblers have to travel a lot and need to play the same games repeatedly. There is no excitement while playing the game offline. But the best betting sites like PKV gambling site gives the better gaming experience to the players. You can choose the may type of games without getting bored. Online PKV gaming sites come with different games like bandarqq, and anyone could enjoy the game. Choosing the best betting site to play the games is essential. Some of the things that you should check while choosing the PKV gambling site are given below.
People prefer to play games on mobile phones as it is easy to carry around. It is more convenient to play casino games on mobile phones rather than on any devices. Many gambling agents considering this to provide the best options for the players so that they can access the games without any hassles. They can enjoy the full features as they do from a laptop or computer.
The top gambling sites use only quality software. Because it will have a significant impact on how the site will be safe and secure. Some of the sites use outdated software, and you can enjoy the game to the fullest. You might get a frustrating experience. So, check whether the site uses quality software.
It is essential that players should choose the site with varieties of games. When you have a huge variety of game, you can access the most preferred types of games. Hence, before you play the bandarqq game online check the essential factors./*
 * Copyright: (c) 2004-2012 Mayo Foundation for Medical Education and 
 * Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the
 * triple-shield Mayo logo are trademarks and service marks of MFMER.
 *
 * Except as contained in the copyright notice above, or as used to identify 
 * MFMER as the author of this software, the trade names, trademarks, service
 * marks, or product names of the copyright holder shall not be used in
 * advertising, promotion or otherwise in connection with this software without
 * prior written authorization of the copyright holder.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.mayo.qdm.executor.drools;


import com.google.common.collect.Sets;
import edu.mayo.qdm.executor.valueset.ValueSetCodeResolver;
import edu.mayo.qdm.patient.CodedEntry;
import edu.mayo.qdm.patient.Concept;
import edu.mayo.qdm.patient.Event;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.*;

/**
 * The Class DroolsUtil.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
@Component
public final class DroolsUtil {

    @Autowired
    private ValueSetCodeResolver valueSetCodeResolver;

    public DroolsUtil(){
        super();
//        JsonValueSetCodeResolver resolver = new JsonValueSetCodeResolver();
//        try {
//            resolver.afterPropertiesSet();
//        } catch (Exception e) {
//            throw new RuntimeException(e);
//        }
//
//        this.valueSetCodeResolver = resolver;
    }

    public DroolsUtil(ValueSetCodeResolver valueSetCodeResolver){
        super();
        this.valueSetCodeResolver = valueSetCodeResolver;
    }

    public boolean contains(String valueSetOid, Iterable<Concept> concepts){
        return contains(valueSetOid, null, concepts);
    }

    public boolean contains(String valueSetOid, Object definition, Iterable<Concept> concepts){
        String def = definition!= null? definition.toString() : null;
        for(Concept concept : concepts){
            if(this.valueSetCodeResolver.isCodeInSet(valueSetOid, def, concept)){
                return true;
            }
        }

        return false;
    }

    public static Long toDays(Date date) {
        if(date == null){
            return null;
        } else {
            return new Long(java.util.concurrent.TimeUnit.MILLISECONDS.toDays(date.getTime()));
        }
    }

    public boolean matches(String valueSetOid, Concept concept){
        return matches(valueSetOid, null, concept);
    }

    public boolean matches(String valueSetOid, Object definition, Concept concept){
        if(concept == null){
            return false;
        }
        String def = definition!= null? definition.toString() : null;
        return this.valueSetCodeResolver.isCodeInSet(valueSetOid, def, concept);
    }

    public <T extends CodedEntry> Collection<T>  findMatches(String valueSetOid, Iterable <T> codedEntries){
        return findMatches(valueSetOid, null, codedEntries);
    }

    public <T extends CodedEntry> Collection<T>  findMatches(String valueSetOid, Object definition, Iterable <T> codedEntries){
        String def = definition!= null? definition.toString() : null;
        List<T> returnList = new ArrayList<T>();
        for(T entry : codedEntries){
            for(Concept c : entry.getConcepts()){
                if(this.valueSetCodeResolver.isCodeInSet(valueSetOid, def, c)){
                    returnList.add(entry);
                    break;
                }
            }

        }

        return returnList;
    }

    public boolean allEquals(Iterable<?> objects){
       Object test = null;
       for(Object object : objects){
           if(test == null){
               test = object;
           } else {
               if(! object.equals(test)){
                   return false;