當前位置: 首頁>>代碼示例>>Java>>正文


Java GroupMatcher.getCompareToValue方法代碼示例

本文整理匯總了Java中org.quartz.impl.matchers.GroupMatcher.getCompareToValue方法的典型用法代碼示例。如果您正苦於以下問題:Java GroupMatcher.getCompareToValue方法的具體用法?Java GroupMatcher.getCompareToValue怎麽用?Java GroupMatcher.getCompareToValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.quartz.impl.matchers.GroupMatcher的用法示例。


在下文中一共展示了GroupMatcher.getCompareToValue方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: toSqlLikeClause

import org.quartz.impl.matchers.GroupMatcher; //導入方法依賴的package包/類
protected String toSqlLikeClause(final GroupMatcher<?> matcher) {
    String groupName;
    switch(matcher.getCompareWithOperator()) {
        case EQUALS:
            groupName = matcher.getCompareToValue();
            break;
        case CONTAINS:
            groupName = "%" + matcher.getCompareToValue() + "%";
            break;
        case ENDS_WITH:
            groupName = "%" + matcher.getCompareToValue();
            break;
        case STARTS_WITH:
            groupName = matcher.getCompareToValue() + "%";
            break;
        case ANYTHING:
            groupName = "%";
            break;
        default:
            throw new UnsupportedOperationException("Don't know how to translate " + matcher.getCompareWithOperator() + " into SQL");
    }
    return groupName;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:24,代碼來源:StdJDBCDelegate.java

示例2: getJobKeys

import org.quartz.impl.matchers.GroupMatcher; //導入方法依賴的package包/類
/**
 * <p>
 * Get the names of all of the <code>{@link org.quartz.Job}</code> s that
 * match the given groupMatcher.
 * </p>
 */
public Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher) {
    Set<JobKey> outList = null;
    synchronized (lock) {

        StringMatcher.StringOperatorName operator = matcher.getCompareWithOperator();
        String compareToValue = matcher.getCompareToValue();

        switch(operator) {
            case EQUALS:
                HashMap<JobKey, JobWrapper> grpMap = jobsByGroup.get(compareToValue);
                if (grpMap != null) {
                    outList = new HashSet<JobKey>();

                    for (JobWrapper jw : grpMap.values()) {

                        if (jw != null) {
                            outList.add(jw.jobDetail.getKey());
                        }
                    }
                }
                break;

            default:
                for (Map.Entry<String, HashMap<JobKey, JobWrapper>> entry : jobsByGroup.entrySet()) {
                    if(operator.evaluate(entry.getKey(), compareToValue) && entry.getValue() != null) {
                        if(outList == null) {
                            outList = new HashSet<JobKey>();
                        }
                        for (JobWrapper jobWrapper : entry.getValue().values()) {
                            if(jobWrapper != null) {
                                outList.add(jobWrapper.jobDetail.getKey());
                            }
                        }
                    }
                }
        }
    }

    return outList == null ? java.util.Collections.<JobKey>emptySet() : outList;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:47,代碼來源:RAMJobStore.java

示例3: getTriggerKeys

import org.quartz.impl.matchers.GroupMatcher; //導入方法依賴的package包/類
/**
 * <p>
 * Get the names of all of the <code>{@link org.quartz.Trigger}</code> s
 * that match the given groupMatcher.
 * </p>
 */
public Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) {
    Set<TriggerKey> outList = null;
    synchronized (lock) {

        StringMatcher.StringOperatorName operator = matcher.getCompareWithOperator();
        String compareToValue = matcher.getCompareToValue();

        switch(operator) {
            case EQUALS:
                HashMap<TriggerKey, TriggerWrapper> grpMap = triggersByGroup.get(compareToValue);
                if (grpMap != null) {
                    outList = new HashSet<TriggerKey>();

                    for (TriggerWrapper tw : grpMap.values()) {

                        if (tw != null) {
                            outList.add(tw.trigger.getKey());
                        }
                    }
                }
                break;

            default:
                for (Map.Entry<String, HashMap<TriggerKey, TriggerWrapper>> entry : triggersByGroup.entrySet()) {
                    if(operator.evaluate(entry.getKey(), compareToValue) && entry.getValue() != null) {
                        if(outList == null) {
                            outList = new HashSet<TriggerKey>();
                        }
                        for (TriggerWrapper triggerWrapper : entry.getValue().values()) {
                            if(triggerWrapper != null) {
                                outList.add(triggerWrapper.trigger.getKey());
                            }
                        }
                    }
                }
        }
    }

    return outList == null ? Collections.<TriggerKey>emptySet() : outList;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:47,代碼來源:RAMJobStore.java

示例4: toSqlEqualsClause

import org.quartz.impl.matchers.GroupMatcher; //導入方法依賴的package包/類
protected String toSqlEqualsClause(final GroupMatcher<?> matcher) {
    return matcher.getCompareToValue();
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:4,代碼來源:StdJDBCDelegate.java


注:本文中的org.quartz.impl.matchers.GroupMatcher.getCompareToValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。