本文整理汇总了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>>();
}
}
示例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);
}
示例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>());
}
示例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>());
}
示例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>());
}
示例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;
}
示例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;
}
示例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>());
}