Package org.compass.core.mapping

Examples of org.compass.core.mapping.ResourceMapping


            invoker = new FieldInvoker(CompassMappingBinding.class, "mapping").prepare();
            CompassMapping mapping = (CompassMapping) invoker.get(mappingBinding);

            ResourceMapping[] mappings = mapping.getRootMappings();
            for (int i = 0; i < mappings.length; i++) {
                ResourceMapping resourceMapping = mappings[i];
                if (resourceMapping.getSpellCheck().equals(SpellCheck.INCLUDE)) {
                    return true;
                }
                for (Iterator iter = resourceMapping.mappingsIt(); iter.hasNext(); ) {
                    Object o = iter.next();
                    if (o instanceof ClassPropertyMapping) {
                        for (Iterator iter2 = ((ClassPropertyMapping) o).mappingsIt(); iter2.hasNext(); ) {
                            Object o2 = iter2.next();
                            if (o2 instanceof ClassPropertyMetaDataMapping) {
View Full Code Here


     * @param instance object instance
     * @return identifier
     */
    public static Serializable getIdent(Compass compass, String alias, Object instance) {
        Assert.notNull(alias, "alias cannot be null");
        ResourceMapping resourceMapping = ((InternalCompass) compass).getMapping().getMappingByAlias(alias);
        Mapping[] ids = resourceMapping.getIdMappings();
        if (ids == null || ids.length == 0) {
            throw new IllegalArgumentException("Null or empty id mappings for alias [" + alias + "]");
        }
        if (ids.length > 1) {
            throw new IllegalArgumentException("Too many id mappings for alias [" + alias + "]: expected only 1");
View Full Code Here

TOP

Related Classes of org.compass.core.mapping.ResourceMapping

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.