001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.upgrade.util;
016    
017    import com.liferay.portal.kernel.upgrade.util.ValueMapper;
018    
019    import java.util.Collections;
020    import java.util.Iterator;
021    
022    /**
023     * @author Alexander Chow
024     * @author Brian Wing Shun Chan
025     */
026    public class DatabaseValueMapper implements ValueMapper {
027    
028            public DatabaseValueMapper() {
029    
030                    // Delete
031    
032            }
033    
034            @Override
035            public void appendException(Object exception) {
036    
037                    // Exceptions
038    
039            }
040    
041            @Override
042            public Object getNewValue(Object oldValue) throws Exception {
043    
044                    // Select
045    
046                    return null;
047            }
048    
049            @Override
050            public Iterator<Object> iterator() throws Exception {
051                    return Collections.emptyList().iterator();
052            }
053    
054            @Override
055            public void mapValue(Object oldValue, Object newValue) throws Exception {
056    
057                    // Insert
058    
059            }
060    
061            @Override
062            public int size() throws Exception {
063                    return 0;
064            }
065    
066    }