当前位置: 首页>>代码示例>>Java>>正文


Java ConstraintResolver类代码示例

本文整理汇总了Java中org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver的典型用法代码示例。如果您正苦于以下问题:Java ConstraintResolver类的具体用法?Java ConstraintResolver怎么用?Java ConstraintResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConstraintResolver类属于org.kuali.rice.krad.datadictionary.validation.constraint.resolver包,在下文中一共展示了ConstraintResolver类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
/**
 * initializes the constraints
 *
 * <p>By doing initialization here, and not in a constructor, constraints are only placed in memory when they are
 * utilized.</p>
 */
public void init() {
    if (resolverMap == null) {
        resolverMap = new HashMap<String, ConstraintResolver<T>>();
    }

}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:BaseConstraintProvider.java

示例2: getConstraints

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.datadictionary.validation.constraint.provider.ConstraintProvider#getConstraints(org.kuali.rice.krad.datadictionary.validation.capability.Constrainable,
 *      java.lang.Class)
 */
@Override
public List<Constraint> getConstraints(T definition, Class<? extends Constraint> constraintType) {
    if (resolverMap == null) {
        init();
    }

    ConstraintResolver<T> resolver = resolverMap.get(constraintType.getName());

    if (resolver == null) {
        return null;
    }

    return resolver.resolve(definition);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:BaseConstraintProvider.java

示例3: init

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
@Override
public void init() {
    resolverMap = new HashMap<String, ConstraintResolver<CollectionDefinition>>();
    resolverMap.put(ExistenceConstraint.class.getName(), new DefinitionConstraintResolver<CollectionDefinition>());
    resolverMap.put(CollectionSizeConstraint.class.getName(),
            new DefinitionConstraintResolver<CollectionDefinition>());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:CollectionDefinitionConstraintProvider.java

示例4: init

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
@Override
public void init() {
    resolverMap = new HashMap<String, ConstraintResolver<AttributeDefinition>>();
    resolverMap.put(SimpleConstraint.class.getName(), new SimpleConstraintResolver<AttributeDefinition>());
    resolverMap.put(CaseConstraint.class.getName(), new CaseConstraintResolver<AttributeDefinition>());
    resolverMap.put(DataTypeConstraint.class.getName(), new DefinitionConstraintResolver<AttributeDefinition>());
    resolverMap.put(LengthConstraint.class.getName(), new DefinitionConstraintResolver<AttributeDefinition>());
    resolverMap.put(ValidCharactersConstraint.class.getName(),
            new ValidCharactersConstraintResolver<AttributeDefinition>());
    resolverMap.put(PrerequisiteConstraint.class.getName(),
            new PrerequisiteConstraintsResolver<AttributeDefinition>());
    resolverMap.put(MustOccurConstraint.class.getName(), new MustOccurConstraintsResolver<AttributeDefinition>());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:AttributeDefinitionConstraintProvider.java

示例5: init

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
@Override
public void init() {
    resolverMap = new HashMap<String, ConstraintResolver<ComplexAttributeDefinition>>();
    resolverMap.put(ExistenceConstraint.class.getName(),
            new DefinitionConstraintResolver<ComplexAttributeDefinition>());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:ComplexAttributeDefinitionConstraintProvider.java

示例6: getResolverMap

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
/**
 * @return the resolverMap
 */
public Map<String, ConstraintResolver<T>> getResolverMap() {
    return this.resolverMap;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:BaseConstraintProvider.java

示例7: setResolverMap

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
/**
 * @param resolverMap the resolverMap to set
 */
public void setResolverMap(Map<String, ConstraintResolver<T>> resolverMap) {
    this.resolverMap = resolverMap;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:BaseConstraintProvider.java

示例8: init

import org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver; //导入依赖的package包/类
@Override
public void init() {
    resolverMap = new HashMap<String, ConstraintResolver<DataObjectEntry>>();
    resolverMap.put(MustOccurConstraint.class.getName(), new MustOccurConstraintsResolver<DataObjectEntry>());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:6,代码来源:DataObjectEntryConstraintProvider.java


注:本文中的org.kuali.rice.krad.datadictionary.validation.constraint.resolver.ConstraintResolver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。