001    /**
002     * Copyright (c) 2000-2010 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            public Object getNewValue(Object oldValue) throws Exception {
035    
036                    // Select
037    
038                    return null;
039            }
040    
041            public void mapValue(Object oldValue, Object newValue) throws Exception {
042    
043                    // Insert
044    
045            }
046    
047            public void appendException(Object exception) {
048    
049                    // Exceptions
050    
051            }
052    
053            public Iterator<Object> iterator() throws Exception {
054                    return Collections.EMPTY_LIST.iterator();
055            }
056    
057            public int size() throws Exception {
058                    return 0;
059            }
060    
061    }