@@ -0,0 +1,1569 @@
+package com.dangdang.ddframe.rdb.sharding.router.single;%0A%0Aimport java.util.List;%0A%0Aimport com.dangdang.ddframe.rdb.sharding.api.ShardingValue;%0Aimport com.dangdang.ddframe.rdb.sharding.parser.result.router.Condition;%0Aimport com.google.common.collect.BoundType;%0Aimport com.google.common.collect.Range;%0Aimport lombok.AccessLevel;%0Aimport lombok.AllArgsConstructor;%0A%0A/**%0A * %E8%B7%AF%E7%94%B1%E5%B7%A5%E5%85%B7%E7%B1%BB.%0A * %0A * %0A */%0A@AllArgsConstructor(access = AccessLevel.PRIVATE)%0Apublic class SingleRouterUtil %7B%0A    %0A    /**%0A     * %E5%B0%86%E6%9D%A1%E4%BB%B6%E5%AF%B9%E8%B1%A1%E8%BD%AC%E6%8D%A2%E4%B8%BA%E5%88%86%E7%89%87%E5%80%BC%E5%AF%B9%E8%B1%A1.%0A     * %0A     * @param condition %E6%9D%A1%E4%BB%B6%E5%AF%B9%E8%B1%A1%0A     * @return %E5%88%86%E7%89%87%E5%80%BC%E5%AF%B9%E8%B1%A1%0A     */%0A    public static ShardingValue%3C?%3E convertConditionToShardingValue(final Condition condition) %7B%0A        List%3CComparable%3C?%3E%3E conditionValues = condition.getValues();%0A        switch (condition.getOperator()) %7B%0A            case EQUAL:%0A            case IN:%0A                if (1 == conditionValues.size()) %7B%0A                    return new ShardingValue%3CComparable%3C?%3E%3E(condition.getColumn().getColumnName(), conditionValues.get(0));%0A                %7D%0A                return new ShardingValue%3C%3E(condition.getColumn().getColumnName(), conditionValues);%0A            case BETWEEN:%0A                return new ShardingValue%3C%3E(condition.getColumn().getColumnName(), Range.range(conditionValues.get(0), BoundType.CLOSED, conditionValues.get(1), BoundType.CLOSED));%0A            default:%0A                throw new UnsupportedOperationException(condition.getOperator().getExpression());%0A        %7D%0A    %7D%0A    %0A%7D%0A%0A    Status API Training Shop Blog About %0A%0A    %C2%A9 2016 GitHub, Inc. Terms Privacy Security Contact Help %0A%0A

Create SingleRouterUtil.java