Package org.codehaus.groovy.grails.orm.hibernate.cfg

Examples of org.codehaus.groovy.grails.orm.hibernate.cfg.Mapping


     * Is the given property an identity property? Checks the property as well as the custom domain class mapping
     * @param domainClassProperty domain clas property
     * @return true if the property is the/an identity property
     */
    public static boolean isIndentityProperty(GrailsDomainClassProperty domainClassProperty) {
        Mapping mapping = new GrailsDomainBinder().getMapping(domainClassProperty.getDomainClass().getClazz());
        if (mapping != null && mapping.getIdentity() instanceof CompositeIdentity) {
            CompositeIdentity identity = (CompositeIdentity) mapping.getIdentity();
            return Arrays.asList(identity.getPropertyNames()).contains(domainClassProperty.getName());
        }
        return domainClassProperty.isIdentity();
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.grails.orm.hibernate.cfg.Mapping

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.