001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.dao.orm.hibernate;
016    
017    import com.liferay.portal.kernel.dao.orm.Projection;
018    import com.liferay.portal.kernel.dao.orm.ProjectionList;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public class ProjectionListImpl
024            extends ProjectionImpl implements ProjectionList {
025    
026            public ProjectionListImpl(
027                    org.hibernate.criterion.ProjectionList projectionList) {
028    
029                    super(projectionList);
030    
031                    _projectionList = projectionList;
032            }
033    
034            @Override
035            public ProjectionList add(Projection projection) {
036                    ProjectionImpl projectionImpl = (ProjectionImpl)projection;
037    
038                    _projectionList.add(projectionImpl.getWrappedProjection());
039    
040                    return this;
041            }
042    
043            @Override
044            public ProjectionList add(Projection projection, String alias) {
045                    ProjectionImpl projectionImpl = (ProjectionImpl)projection;
046    
047                    _projectionList.add(projectionImpl.getWrappedProjection(), alias);
048    
049                    return this;
050            }
051    
052            public org.hibernate.criterion.ProjectionList getWrappedProjectionList() {
053                    return _projectionList;
054            }
055    
056            private org.hibernate.criterion.ProjectionList _projectionList;
057    
058    }