如何对TypeScript服务中的枚举使用条件? [英] How to use criteria with enums from TypeScript service?
本文介绍了如何对TypeScript服务中的枚举使用条件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的条件大致如下:
public class DocuSignTemplateDefinitionCriteria implements Serializable {
public static class DocuSignTemplateTypeFilter extends Filter<DocuSignTemplateType> {
}
private DocuSignTemplateTypeFilter templateType;
private LongFilter sponsorLevelId;
private LongFilter languageId;
private LongFilter eventId;
从TypeScript服务中,我可以将查询与所有简单类型(在本例中为longs)一起使用:
From the TypeScript service, I can use the query with all the simple types (in this example, longs):
this.http.get(`${this.resourceUrl}languageId.equals=2&sponsorLevelId.equals=4&eventId.equals=1001`)
但是我不知道如何查询枚举DocuSignTemplateType
.我已经使用了几种语法(下面是一个示例),但是我弄不清楚.
But I can't figure out how to query the enum DocuSignTemplateType
. I've used several syntaxes (below is one example), but I can't get it right.
this.http.get(`${this.resourceUrl}?languageId.equals=2&sponsorLevelId.equals=4&eventId.equals=1001&templateType.equals=DocuSignTemplateType.SPONSOR_AGREEMENT`)
有什么主意吗?关于如何存档的任何示例吗?
Any idea ? Any example on how to archieve this ?
谢谢
推荐答案
如注释中所述,它必须为templateType.equals=SPONSOR_AGREEMENT
,没有枚举类名称.
As said in comment, it must be templateType.equals=SPONSOR_AGREEMENT
without the enum class name.
这篇关于如何对TypeScript服务中的枚举使用条件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文