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.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    }