Examples of ModFunction


Examples of com.alibaba.cobar.client.router.rules.support.ModFunction

    public void testRuleShardingPatternWithCustomFunctions() throws Exception {
        String shardingExpression = "mod.apply(id)==3";
        IBatisNamespaceShardingRule r = new IBatisNamespaceShardingRule(DEFAULT_TYPE_PATTEN,
                StringUtils.join(DEFAULT_SHARDS, ","), shardingExpression);
        Map<String, Object> functions = new HashMap<String, Object>();
        functions.put("mod", new ModFunction(18L));
        r.setFunctionMap(functions);

        Tweet t = new Tweet();
        t.setId(3L);
        t.setTweet("anything");
View Full Code Here

Examples of com.alibaba.cobar.client.router.rules.support.ModFunction

    public void testSqlActionShardingRuleWithCustomFunctions() {
        IBatisSqlActionShardingRule r = new IBatisSqlActionShardingRule(DEFAULT_TYPE_PATTEN,
                "shard1,shard2", "mod.apply(id)==3");
        Map<String, Object> functions = new HashMap<String, Object>();
        functions.put("mod", new ModFunction(18L));
        r.setFunctionMap(functions);
       
        Tweet t = new Tweet();
        t.setId(21L);
        t.setTweet("anything");
View Full Code Here

Examples of com.sun.xacml.cond.ModFunction

    public Set<Function> getSupportedFunctions() {
        Set<Function> set = new HashSet<Function>();

        for (String fn : ModFunction.getSupportedIdentifiers())
            set.add(new ModFunction(fn));

        return set;
    }
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.cond.ModFunction

    public Set getSupportedFunctions() {
        Set set = new HashSet();
        Iterator it = ModFunction.getSupportedIdentifiers().iterator();

        while (it.hasNext())
            set.add(new ModFunction((String)(it.next())));

        return set;
    }
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.cond.ModFunction

    public Set getSupportedFunctions() {
        Set set = new HashSet();
        Iterator it = ModFunction.getSupportedIdentifiers().iterator();

        while (it.hasNext())
            set.add(new ModFunction((String)(it.next())));

        return set;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.