Package org.codehaus.groovy.grails.validation

Examples of org.codehaus.groovy.grails.validation.ConstrainedProperty


    }

    GrailsDomainClassProperty prop1 = (GrailsDomainClassProperty)o1;
    GrailsDomainClassProperty prop2 = (GrailsDomainClassProperty)o2;

    ConstrainedProperty cp1 = (ConstrainedProperty)constrainedProperties.get(prop1.getName());
    ConstrainedProperty cp2 = (ConstrainedProperty)constrainedProperties.get(prop2.getName());

    if (cp1 == null & cp2 == null) {
      return prop1.getName().compareTo(prop2.getName());
    }

    if (cp1 == null) {
      return 1;
    }

    if (cp2 == null) {
      return -1;
    }

    if (cp1.getOrder() > cp2.getOrder()) {
      return 1;
    }

    if (cp1.getOrder() < cp2.getOrder()) {
      return -1;
    }

    return 0;
  }
View Full Code Here


        }

        GrailsDomainClassProperty prop1 = (GrailsDomainClassProperty)o1;
        GrailsDomainClassProperty prop2 = (GrailsDomainClassProperty)o2;

        ConstrainedProperty cp1 = (ConstrainedProperty)constrainedProperties.get(prop1.getName());
        ConstrainedProperty cp2 = (ConstrainedProperty)constrainedProperties.get(prop2.getName());

        if (cp1 == null & cp2 == null) {
            return prop1.getName().compareTo(prop2.getName());
        }

        if (cp1 == null) {
            return 1;
        }

        if (cp2 == null) {
            return -1;
        }

        if (cp1.getOrder() > cp2.getOrder()) {
            return 1;
        }

        if (cp1.getOrder() < cp2.getOrder()) {
            return -1;
        }

        return 0;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.grails.validation.ConstrainedProperty

Copyright © 2018 www.massapicom. 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.