@Test public void testCreateConditionContext() { ConditionContext ctx = test.createConditionContext(exp(OperatorEnum.EQUAL, "1"), OperatorEnum.BEWTEEN, "2"); assertEquals("2", ctx.getValue()); assertEquals(OperatorEnum.BEWTEEN, ctx.getOperator()); }
@SuppressWarnings("unchecked") protected CTX createConditionContext(CTX conditionContext, OperatorEnum newOperator, Object newValue) { return (CTX)conditionContext.create(newOperator, newValue); }
AbstractConditionShardLocator { @SuppressWarnings("unchecked") protected CTX createConditionContext(CTX conditionContext, OperatorEnum newOperator, Object newValue) { return (CTX)conditionContext.create(newOperator, newValue); } }
AbstractConditionShardLocator { @SuppressWarnings("unchecked") protected CTX createConditionContext(CTX conditionContext, OperatorEnum newOperator, Object newValue) { return (CTX)conditionContext.create(newOperator, newValue); }  }
AbstractConditionShardLocator { @SuppressWarnings("unchecked") protected CTX createConditionContext(CTX conditionContext, OperatorEnum newOperator, Object newValue) { return (CTX)conditionContext.create(newOperator, newValue); }  abstract Set<String> locateForEqual(CTX context); abstract Set<String> locateForNotEqual(CTX ctx); abstract Set<String> locateForGreaterThan(CTX context); abstract Set<String> locateForGreaterThanOrEqual(CTX ctx); abstract Set<String> locateForLessThan(CTX context); abstract Set<String> locateForLessThanOrEqual(CTX ctx); abstract Set<String> locateForBetween(CTX ctx); abstract Set<String> locateForNotBetween(CTX ctx); abstract Set<String> locateForIn(CTX context); abstract Set<String> locateForNotIn(CTX context); abstract Set<String> locateForLike(CTX context); abstract Set<String> locateForNotLike(CTX context); abstract Set<String> locateForIsNull(CTX context); abstract Set<String> locateForIsNotNull(CTX context); Set<String> getAllShards(CTX context); Set<String> locateShards(CTX context); }
AbstractConditionShardLocator { @SuppressWarnings("unchecked") protected CTX createConditionContext(CTX conditionContext, OperatorEnum newOperator, Object newValue) { return (CTX)conditionContext.create(newOperator, newValue); }  abstract Set<String> locateForEqual(CTX context); abstract Set<String> locateForNotEqual(CTX ctx); abstract Set<String> locateForGreaterThan(CTX context); abstract Set<String> locateForGreaterThanOrEqual(CTX ctx); abstract Set<String> locateForLessThan(CTX context); abstract Set<String> locateForLessThanOrEqual(CTX ctx); abstract Set<String> locateForBetween(CTX ctx); abstract Set<String> locateForNotBetween(CTX ctx); abstract Set<String> locateForIn(CTX context); abstract Set<String> locateForNotIn(CTX context); abstract Set<String> locateForLike(CTX context); abstract Set<String> locateForNotLike(CTX context); abstract Set<String> locateForIsNull(CTX context); abstract Set<String> locateForIsNotNull(CTX context); Set<String> getAllShards(CTX context); Set<String> locateShards(CTX context);  }