Examples of validate()


Examples of org.apache.cassandra.db.index.SecondaryIndex.validate()

        {
            try
            {
                Class<? extends SecondaryIndex> clazz = Class.forName(customClass).asSubclass(SecondaryIndex.class);
                SecondaryIndex secondaryIndex = clazz.newInstance();
                secondaryIndex.validate(metadata, getOptions());
            }
            catch (ClassNotFoundException | IllegalAccessException | InstantiationException e)
            {
                throw new InvalidRequestException("Class not found");
            }
View Full Code Here

Examples of org.apache.cassandra.db.marshal.AbstractType.validate()

    }

    protected void validateName(CFMetaData metadata) throws MarshalException
    {
        AbstractType nameValidator = metadata.cfType == ColumnFamilyType.Super ? metadata.subcolumnComparator : metadata.comparator;
        nameValidator.validate(name());
    }

    public void validateFields(CFMetaData metadata) throws MarshalException
    {
        validateName(metadata);
View Full Code Here

Examples of org.apache.cassandra.io.compress.CompressionParameters.validate()

            Map<String, String> remainingOptions = new HashMap<>(compressionOptions);
            remainingOptions.remove(CompressionParameters.SSTABLE_COMPRESSION);
            remainingOptions.remove(CompressionParameters.CHUNK_LENGTH_KB);
            CompressionParameters cp = new CompressionParameters(sstableCompressionClass, chunkLength, remainingOptions);
            cp.validate();
        }

        validateMinimumInt(KW_DEFAULT_TIME_TO_LIVE, 0, CFMetaData.DEFAULT_DEFAULT_TIME_TO_LIVE);

        Integer minIndexInterval = getInt(KW_MIN_INDEX_INTERVAL, null);
View Full Code Here

Examples of org.apache.cassandra.io.sstable.format.Version.validate()

        // version
        nexttok = tokenStack.pop();
        Version version = fmt.info.getVersion(nexttok);

        if (!version.validate(nexttok))
            throw new UnsupportedOperationException("SSTable " + name + " is too old to open.  Upgrade to 2.0 first, and run upgradesstables");

        // optional temporary marker
        Type type = Descriptor.Type.FINAL;
        nexttok = tokenStack.peek();
View Full Code Here

Examples of org.apache.cayenne.modeler.util.ModelerDbAdapter.validate()

        if (node == null) {
            return;
        }

        ModelerDbAdapter adapter = new ModelerDbAdapter(name, node.getDataSource());
        adapter.validate();
        node.setAdapter(adapter);
       
        DataNodeEvent e = new DataNodeEvent(AdapterEditor.this, node);
        ((ProjectController) getParent()).fireDataNodeEvent(e);
    }
View Full Code Here

Examples of org.apache.cayenne.project.validation.ProjectValidator.validate()

            allFailures.addAll(loadFailures);
        }

        ProjectValidator projectValidator = getApplication().getInjector().getInstance(
                ProjectValidator.class);
        ValidationResult validationResult = projectValidator.validate(project
                .getRootNode());
        allFailures.addAll(validationResult.getFailures());

        if (!allFailures.isEmpty()) {
            ValidatorDialog.showDialog(frame, validationResult.getFailures());
View Full Code Here

Examples of org.apache.cayenne.project.validator.Validator.validate()

        performAction(ValidationDisplayHandler.WARNING);
    }

    public synchronized void performAction(int warningLevel) {
        Validator val = getCurrentProject().getValidator();
        int validationCode = val.validate();

        // If no serious errors, perform save.
        if (validationCode < ValidationDisplayHandler.ERROR) {
            try {
                if (!saveAll()) {
View Full Code Here

Examples of org.apache.cocoon.components.validation.Validator.validate()

            long time = System.currentTimeMillis();
            List vs = null;

            for (int i = 0; i<count; i++) {
                // perform validation
                vs = validator.validate(tbean);
            }
            time = System.currentTimeMillis()-time;
            System.out.println("Validation performed "+count+
                               " times for a total of "+time+" ms");
            System.out.println("Avarage validation time is "+(time/count)+
View Full Code Here

Examples of org.apache.cocoon.forms.datatype.ValidationRule.validate()

    public ValidationError validate(Object value, ExpressionContext expressionContext) {
        Iterator validationRulesIt = validationRules.iterator();
        while (validationRulesIt.hasNext()) {
            ValidationRule validationRule = (ValidationRule)validationRulesIt.next();
            ValidationError result = validationRule.validate(value, expressionContext);
            if (result != null)
                return result;
        }
        return null;
    }
View Full Code Here

Examples of org.apache.cocoon.forms.validation.WidgetValidator.validate()

            } else {
                // Iterate on local validators
                Iterator iter = this.validators.iterator();
                while(iter.hasNext()) {
                    WidgetValidator validator = (WidgetValidator)iter.next();
                    if (!validator.validate(this)) {
                        return false;
                    }
                }
                // All local iterators successful
                return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.