class AbstractConditionStrategy extends AbstractShardingStrategy {

    @Override
    public void initialize(Map<String, String> settings) {
        super.initialize(settings);
        
        if(settings.containsKey(COLUMNS)) {
            dbShardColumns = parseNames(settings.get(COLUMNS));
            setShardByDb(true);
        }
        
        if(settings.containsKey(TABLE_COLUMNS)) {
            tableShardColumns = parseNames(settings.get(TABLE_COLUMNS));
            setShardByTable(true);
        }

        if(isShardByDb() == false && isShardByTable() == false) {
            throw new IllegalArgumentException("Property " + COLUMNS + " or " + TABLE_COLUMNS + " is required for the strategy");
        }
    }

}