Package org.modeshape.jcr.cache.change

Examples of org.modeshape.jcr.cache.change.AbstractPropertyChange


                    for (Change change : changeSet) {
                        if (change instanceof AbstractNodeChange) {
                            AbstractNodeChange nodeChange = (AbstractNodeChange)change;
                            if (acceptableNodeType(nodeChange)) {
                                if (nodeChange instanceof AbstractPropertyChange) {
                                    AbstractPropertyChange propChange = (AbstractPropertyChange)nodeChange;
                                    Property property = propChange.getProperty();
                                    if (indexedPropertyName.equals(property.getName())) {
                                        if (nodeChange instanceof PropertyAdded) {
                                            ops.add(propChange.getKey(), property);
                                        } else if (nodeChange instanceof PropertyChanged) {
                                            PropertyChanged changedProperty = (PropertyChanged)nodeChange;
                                            ops.change(propChange.getKey(), property, changedProperty.getOldProperty());
                                        } else if (nodeChange instanceof PropertyRemoved) {
                                            ops.remove(propChange.getKey());
                                        }
                                    }
                                } else if (nodeChange instanceof NodeAdded) {
                                    NodeAdded added = (NodeAdded)nodeChange;
                                    Property addedProperty = added.getProperties().get(indexedPropertyName);
View Full Code Here


                        processProperties();
                        nodeKey = nodeChange.getKey();
                    }
                    // We know we care about this node type, so figure out if there are any properties we care about ...
                    if (nodeChange instanceof AbstractPropertyChange) {
                        AbstractPropertyChange propChange = (AbstractPropertyChange)nodeChange;
                        Property property = propChange.getProperty();
                        for (int i = 0; i != numberOfProperties; ++i) {
                            if (indexedPropertyNames[i].equals(property.getName())) {
                                if (nodeChange instanceof PropertyAdded) {
                                    newProps[i] = property;
                                    hasNewProps = true;
View Full Code Here

        }

        @Override
        protected void modifyProperties( NodeKey key,
                                         Map<Name, AbstractPropertyChange> propChanges ) {
            AbstractPropertyChange propChange = propChanges.get(propertyName);
            if (propChange instanceof PropertyChanged) {
                PropertyChanged change = (PropertyChanged)propChange;
                removeValues(key);
                addValues(key, change.getNewProperty());
            } else if (propChange instanceof PropertyAdded) {
View Full Code Here

        }

        @Override
        protected void modifyProperties( NodeKey key,
                                         Map<Name, AbstractPropertyChange> propChanges ) {
            AbstractPropertyChange propChange = propChanges.get(JcrLexicon.PRIMARY_TYPE);
            if (propChange instanceof PropertyChanged) {
                PropertyChanged change = (PropertyChanged)propChange;
                addValue(key, change.getNewProperty().getFirstValue());
                removeValue(key, change.getOldProperty().getFirstValue());
            }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.cache.change.AbstractPropertyChange

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.