本文整理匯總了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;
}
示例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;
}
示例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;
}
示例4: toSqlEqualsClause
import org.quartz.impl.matchers.GroupMatcher; //導入方法依賴的package包/類
protected String toSqlEqualsClause(final GroupMatcher<?> matcher) {
return matcher.getCompareToValue();
}