001    /**
002     * Copyright (c) 2000-2010 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            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    }