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.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            public ProjectionList add(Projection projection, String alias) {
035                    ProjectionImpl projectionImpl = (ProjectionImpl)projection;
036    
037                    _projectionList.add(projectionImpl.getWrappedProjection(), alias);
038    
039                    return this;
040            }
041    
042            public ProjectionList add(Projection projection) {
043                    ProjectionImpl projectionImpl = (ProjectionImpl)projection;
044    
045                    _projectionList.add(projectionImpl.getWrappedProjection());
046    
047                    return this;
048            }
049    
050            public org.hibernate.criterion.ProjectionList getWrappedProjectionList() {
051                    return _projectionList;
052            }
053    
054            private org.hibernate.criterion.ProjectionList _projectionList;
055    
056    }