Examples of Length


Examples of org.hibernate.validator.Length

            Size size = field.getAnnotation(Size.class);
            formField.setMin(size.min());
            formField.setMax(size.max());
        }
        if (field.getAnnotation(Length.class) != null) {
            Length length = field.getAnnotation(Length.class);
            formField.setMin(length.min());
            formField.setMax(length.max());
        }
        if (field.getAnnotation(Pattern.class) != null) {
            formField.setRegExp(field.getAnnotation(Pattern.class).regex());
        }
    }
View Full Code Here

Examples of org.hibernate.validator.constraints.Length

      required = true;
    }

    // determine max length
    int maxlen = -1;
    final Length aLength = m.getAnnotation(Length.class);
    if(aLength != null) {
      maxlen = aLength.max();
    }
    else {
      // try Size anno
      final Size aSize = m.getAnnotation(Size.class);
      if(aSize != null) {
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

            SelectorName replacement = rewrittenSelectors.get(score.getSelectorName());
            if (replacement == null) return score;
            return new FullTextSearchScore(replacement);
        }
        if (operand instanceof Length) {
            Length operation = (Length)operand;
            PropertyValue wrapped = operation.getPropertyValue();
            SelectorName replacement = rewrittenSelectors.get(wrapped.getSelectorName());
            if (replacement == null) return operand;
            return new Length(new PropertyValue(replacement, wrapped.getPropertyName()));
        }
        if (operand instanceof LowerCase) {
            LowerCase operation = (LowerCase)operand;
            SelectorName replacement = rewrittenSelectors.get(operation.getSelectorName());
            if (replacement == null) return operand;
            return new LowerCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
        }
        if (operand instanceof UpperCase) {
            UpperCase operation = (UpperCase)operand;
            SelectorName replacement = rewrittenSelectors.get(operation.getSelectorName());
            if (replacement == null) return operand;
            return new UpperCase(replaceReferencesToRemovedSource(context, operation.getOperand(), rewrittenSelectors));
        }
        if (operand instanceof NodeName) {
            NodeName name = (NodeName)operand;
            SelectorName replacement = rewrittenSelectors.get(name.getSelectorName());
            if (replacement == null) return name;
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

                }
            }
            return composite;
        }
        if (operand instanceof Length) {
            Length operation = (Length)operand;
            return new Length((PropertyValue)replaceViewReferences(context, operation.getPropertyValue(), mapping, node));
        }
        if (operand instanceof LowerCase) {
            LowerCase operation = (LowerCase)operand;
            return new LowerCase(replaceViewReferences(context, operation.getOperand(), mapping, node));
        }
        if (operand instanceof UpperCase) {
            UpperCase operation = (UpperCase)operand;
            return new UpperCase(replaceViewReferences(context, operation.getOperand(), mapping, node));
        }
        if (operand instanceof NodeName) {
            NodeName name = (NodeName)operand;
            if (!mapping.getOriginalName().equals(name.getSelectorName())) return name;
            if (!mapping.isMappedToSingleSelector()) return name;
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

         *
         * @see org.jboss.dna.graph.query.QueryBuilder.OrderByOperandBuilder#length(java.lang.String, java.lang.String)
         */
        public OrderByBuilder length( String table,
                                      String property ) {
            return addOrdering(new Length(new PropertyValue(selector(table), property)));
        }
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

         *
         * @see org.jboss.dna.graph.query.QueryBuilder.DynamicOperandBuilder#length(java.lang.String, java.lang.String)
         */
        public ComparisonBuilder length( String table,
                                         String property ) {
            return comparisonBuilder(new Length(new PropertyValue(selector(table), property)));
        }
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

         * @param property the name of the property; may not be null and must refer to a valid property name
         * @return the interface for completing the value portion of the criteria specification; never null
         */
        public ComparisonBuilder length( String table,
                                         String property ) {
            return comparisonBuilder(new Length(new PropertyValue(selector(table), property)));
        }
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

        Position pos = tokens.nextPosition();
        if (tokens.canConsume('(')) {
            result = parseDynamicOperand(tokens, typeSystem, source);
            tokens.consume(")");
        } else if (tokens.canConsume("LENGTH", "(")) {
            result = new Length(parsePropertyValue(tokens, typeSystem, source));
            tokens.consume(")");
        } else if (tokens.canConsume("LOWER", "(")) {
            result = new LowerCase(parseDynamicOperand(tokens, typeSystem, source));
            tokens.consume(")");
        } else if (tokens.canConsume("UPPER", "(")) {
View Full Code Here

Examples of org.jboss.dna.graph.query.model.Length

                }
            };
        }
        final TypeFactory<String> stringFactory = typeSystem.getStringFactory();
        if (operand instanceof Length) {
            Length length = (Length)operand;
            PropertyValue value = length.getPropertyValue();
            String propertyName = value.getPropertyName();
            String selectorName = value.getSelectorName().getName();
            final int index = columns.getColumnIndexForProperty(selectorName, propertyName);
            // Find the expected property type of the value ...
            Table table = context.getSchemata().getTable(value.getSelectorName());
View Full Code Here

Examples of org.modeshape.jcr.query.model.Length

        }

        @Override
        public OrderByBuilder length( String table,
                                      String property ) {
            return addOrdering(new Length(new PropertyValue(selector(table), property)));
        }
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.