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


Java SimpleConstraint類代碼示例

本文整理匯總了Java中org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint的典型用法代碼示例。如果您正苦於以下問題:Java SimpleConstraint類的具體用法?Java SimpleConstraint怎麽用?Java SimpleConstraint使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SimpleConstraint類屬於org.kuali.rice.krad.datadictionary.validation.constraint包,在下文中一共展示了SimpleConstraint類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: process

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * Processes the SimpleConstraint by calling process on the other smaller constraints it represents and
 * putting the results together in ProcessorResult
 *
 * @return processor result
 * @throws AttributeValidationException
 * @see MandatoryElementConstraintProcessor#process(org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult,
 *      Object, org.kuali.rice.krad.datadictionary.validation.constraint.Constraint,
 *      org.kuali.rice.krad.datadictionary.validation.AttributeValueReader)
 */
@Override
public ProcessorResult process(DictionaryValidationResult result, Object value, final SimpleConstraint constraint,
        AttributeValueReader attributeValueReader) throws AttributeValidationException {

    ProcessorResult dataTypePR = dataTypeConstraintProcessor.process(result, value, constraint,
            attributeValueReader);
    ProcessorResult existencePR = existenceConstraintProcessor.process(result, value, constraint,
            attributeValueReader);
    ProcessorResult rangePR = rangeConstraintProcessor.process(result, value, constraint, attributeValueReader);
    ProcessorResult lengthPR = lengthConstraintProcessor.process(result, value, constraint, attributeValueReader);
    List<ConstraintValidationResult> cvrList = new ArrayList<ConstraintValidationResult>();
    cvrList.addAll(existencePR.getConstraintValidationResults());
    cvrList.addAll(rangePR.getConstraintValidationResults());
    cvrList.addAll(lengthPR.getConstraintValidationResults());
    cvrList.addAll(dataTypePR.getConstraintValidationResults());
    return new ProcessorResult(cvrList);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:28,代碼來源:SimpleConstraintProcessor.java

示例2: process

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * Processes the SimpleConstraint by calling process on the other smaller constraints it represents and
 * putting the results together in ProcessorResult
 *
 * @return
 * @throws AttributeValidationException
 * @see MandatoryElementConstraintProcessor#process(org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult,
 *      Object, org.kuali.rice.krad.datadictionary.validation.constraint.Constraint,
 *      org.kuali.rice.krad.datadictionary.validation.AttributeValueReader)
 */
@Override
public ProcessorResult process(DictionaryValidationResult result, Object value, final SimpleConstraint constraint,
        AttributeValueReader attributeValueReader) throws AttributeValidationException {

    ProcessorResult dataTypePR = dataTypeConstraintProcessor.process(result, value, constraint,
            attributeValueReader);
    ProcessorResult existencePR = existenceConstraintProcessor.process(result, value, constraint,
            attributeValueReader);
    ProcessorResult rangePR = rangeConstraintProcessor.process(result, value, constraint, attributeValueReader);
    ProcessorResult lengthPR = lengthConstraintProcessor.process(result, value, constraint, attributeValueReader);
    List<ConstraintValidationResult> cvrList = new ArrayList<ConstraintValidationResult>();
    cvrList.addAll(existencePR.getConstraintValidationResults());
    cvrList.addAll(rangePR.getConstraintValidationResults());
    cvrList.addAll(lengthPR.getConstraintValidationResults());
    cvrList.addAll(dataTypePR.getConstraintValidationResults());
    return new ProcessorResult(cvrList);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:28,代碼來源:SimpleConstraintProcessor.java

示例3: InputFieldBase

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
public InputFieldBase() {
    super();

    simpleConstraint = new SimpleConstraint();

    enableAutoDirectInquiry = true;
    enableAutoQuickfinder = true;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:InputFieldBase.java

示例4: init

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的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: getSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
@BeanTagAttribute
public SimpleConstraint getSimpleConstraint() {
    return this.simpleConstraint;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:InputFieldBase.java

示例6: setSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public void setSimpleConstraint(SimpleConstraint simpleConstraint) {
    this.simpleConstraint = simpleConstraint;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:InputFieldBase.java

示例7: ViewAttributeValueReader

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * Constructor for ViewAttributeValueReader, the View must already be indexed and
 * the InputFields must have already be initialized for this reader to work properly
 *
 * @param form model object representing the View's form data
 */
public ViewAttributeValueReader(ViewModel form) {
    this.form = form;

    ViewPostMetadata viewPostMetadata = form.getViewPostMetadata();

    // Copying information stored about InputField in the post metadata to info objects for use by this reader
    for (String id : viewPostMetadata.getInputFieldIds()) {
        InputFieldConstrainableInfo info = new InputFieldConstrainableInfo();

        Object label = viewPostMetadata.getComponentPostData(id, UifConstants.PostMetadata.LABEL);
        if (label != null) {
            info.setLabel((String) label);
        }

        Object name = viewPostMetadata.getComponentPostData(id, UifConstants.PostMetadata.PATH);
        if (name != null) {
            info.setName((String) name);
        }

        Object validCharactersConstraint = viewPostMetadata.getComponentPostData(id,
                UifConstants.PostMetadata.VALID_CHARACTER_CONSTRAINT);
        if (validCharactersConstraint != null) {
            info.setValidCharactersConstraint((ValidCharactersConstraint) validCharactersConstraint);
        }

        Object caseConstraint = viewPostMetadata.getComponentPostData(id,
                UifConstants.PostMetadata.CASE_CONSTRAINT);
        if (caseConstraint != null) {
            info.setCaseConstraint((CaseConstraint) caseConstraint);
        }

        Object prerequisiteConstraints = viewPostMetadata.getComponentPostData(id,
                UifConstants.PostMetadata.PREREQ_CONSTSTRAINTS);
        if (prerequisiteConstraints != null) {
            info.setPrerequisiteConstraints((List<PrerequisiteConstraint>) prerequisiteConstraints);
        }

        Object mustOccurConstraints = viewPostMetadata.getComponentPostData(id,
                UifConstants.PostMetadata.MUST_OCCUR_CONSTRAINTS);
        if (mustOccurConstraints != null) {
            info.setMustOccurConstraints((List<MustOccurConstraint>) mustOccurConstraints);
        }

        Object simpleConstraint = viewPostMetadata.getComponentPostData(id,
                UifConstants.PostMetadata.SIMPLE_CONSTRAINT);
        if (simpleConstraint != null) {
            info.setSimpleConstraint((SimpleConstraint) simpleConstraint);
        }

        inputFields.add(info);
        inputFieldMap.put(info.getName(), info);
    }
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:60,代碼來源:ViewAttributeValueReader.java

示例8: getSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public SimpleConstraint getSimpleConstraint() {
    return simpleConstraint;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:8,代碼來源:ViewAttributeValueReader.java

示例9: setSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * @see org.kuali.rice.krad.datadictionary.validation.ViewAttributeValueReader.InputFieldConstrainableInfo#getSimpleConstraint()
 */
public void setSimpleConstraint(SimpleConstraint simpleConstraint) {
    this.simpleConstraint = simpleConstraint;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:7,代碼來源:ViewAttributeValueReader.java

示例10: getConstraintType

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
@Override
public Class<? extends Constraint> getConstraintType() {
    return SimpleConstraint.class;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:5,代碼來源:SimpleConstraintProcessor.java

示例11: AttributeDefinitionBase

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
public AttributeDefinitionBase() {
    super();
    simpleConstraint = new SimpleConstraint();
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:5,代碼來源:AttributeDefinitionBase.java

示例12: InputField

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
public InputField() {
    super();

    simpleConstraint = new SimpleConstraint();
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:6,代碼來源:InputField.java

示例13: setSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * Setter for simple constraint
 *
 * <p>
 * When a simple constraint is set on this object ALL simple validation
 * constraints set directly will be overridden - recommended to use this or
 * the other gets/sets for defining simple constraints, not both.
 * </p>
 *
 * @param simpleConstraint the simple constraint to set
 */
void setSimpleConstraint(SimpleConstraint simpleConstraint);
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:13,代碼來源:InputField.java

示例14: getSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * Gets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.
 *
 * @return SimpleConstraint object
 */
@Override
public SimpleConstraint getSimpleConstraint() {
    return simpleConstraint;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:10,代碼來源:AttributeDefinitionBase.java

示例15: setSimpleConstraint

import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //導入依賴的package包/類
/**
 * Sets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.
 *
 * @param simpleConstraint
 */
public void setSimpleConstraint(SimpleConstraint simpleConstraint) {
    this.simpleConstraint = simpleConstraint;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:9,代碼來源:AttributeDefinitionBase.java


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