Package org.codehaus.groovy.grails.commons

Examples of org.codehaus.groovy.grails.commons.GrailsDomainClassProperty


    if (!StringUtils.hasLength(templateText)) {
      return;
    }

    GrailsDomainClassProperty multiPart = null;
    for (GrailsDomainClassProperty property : domainClass.getProperties()) {
      if (property.getType() == Byte[].class || property.getType() == byte[].class) {
        multiPart = property;
        break;
      }
View Full Code Here


    }
    if (o2.equals(domainClass.getIdentifier())) {
      return 1;
    }

    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;
    }
View Full Code Here

        }
        if (o2.equals(domainClass.getIdentifier())) {
            return 1;
        }

        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;
        }
View Full Code Here

        Class mappedClass = grailsDomainClass.getClazz();
        List properties = new ArrayList();
        GrailsDomainClassProperty[] domainClassProperties = grailsDomainClass.getProperties();
        for (int i = 0, max = domainClassProperties.length; i < max; i++) {
            GrailsDomainClassProperty property = domainClassProperties[i];
            String propertyName = property.getName();
            if (!GrailsDomainClassUtils.isIndentityProperty(property) && !SearchableUtils.isIncludedProperty(propertyName, searchableValue)) {
                LOG.debug(
                    "Not mapping [" + ClassUtils.getShortName(mappedClass) + "." + propertyName + "] because of " +
                    (defaultExcludes ? "default property exclusions" : "specified only/except rule")
                );
View Full Code Here

                CompassClassPropertyMapping propertyMapping = (CompassClassPropertyMapping) piter.next();
                if ((propertyMapping.isComponent() || propertyMapping.isReference()) && !propertyMapping.hasAttribute("refAlias")) {
                    Set aliases = new HashSet();
                    Class clazz = propertyMapping.getPropertyType();
                    aliases.add(((CompassClassMapping) mappingByClass.get(clazz)).getAlias());
                    GrailsDomainClassProperty domainClassProperty = GrailsDomainClassUtils.getGrailsDomainClassProperty(grailsDomainClasses, mappedClass, propertyMapping.getPropertyName());

                    GrailsDomainClass dc = domainClassProperty.getReferencedDomainClass();
                    if (dc == null) {
                        Class elementClass = SearchableUtils.getElementClass(domainClassProperty);
                        dc = GrailsDomainClassUtils.getGrailsDomainClass(elementClass, grailsDomainClasses);

                        if (dc == null) {
                            LOG.warn("Cannot find domain class for property '" + domainClassProperty.getName() +
                                    "' of class '" + domainClassProperty.getDomainClass().getFullName());
                            continue;
                        }
                    }
                    Collection clazzes = GrailsDomainClassUtils.getClazzes(dc.getSubClasses());
                    for (Iterator citer = clazzes.iterator(); citer.hasNext(); ) {
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.grails.commons.GrailsDomainClassProperty

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.