001    /**
002     * Copyright (c) 2000-present 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.kernel.dao.orm;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.search.Document;
019    import com.liferay.portal.kernel.transaction.TransactionAttribute;
020    import com.liferay.portal.service.BaseLocalService;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    public interface ActionableDynamicQuery {
026    
027            public void addDocument(Document document) throws PortalException;
028    
029            public AddCriteriaMethod getAddCriteriaMethod();
030    
031            public PerformActionMethod getPerformActionMethod();
032    
033            public PerformCountMethod getPerformCountMethod();
034    
035            public void performActions() throws PortalException;
036    
037            public long performCount() throws PortalException;
038    
039            public void setAddCriteriaMethod(AddCriteriaMethod addCriteriaMethod);
040    
041            public void setBaseLocalService(BaseLocalService baseLocalService);
042    
043            public void setClass(Class<?> clazz);
044    
045            public void setClassLoader(ClassLoader classLoader);
046    
047            public void setCommitImmediately(boolean commitImmediately);
048    
049            public void setCompanyId(long companyId);
050    
051            public void setGroupId(long groupId);
052    
053            public void setGroupIdPropertyName(String groupIdPropertyName);
054    
055            public void setInterval(int interval);
056    
057            public void setPerformActionMethod(PerformActionMethod performActionMethod);
058    
059            public void setPerformCountMethod(PerformCountMethod performCountMethod);
060    
061            public void setPrimaryKeyPropertyName(String primaryKeyPropertyName);
062    
063            public void setSearchEngineId(String searchEngineId);
064    
065            public void setTransactionAttribute(
066                    TransactionAttribute transactionAttribute);
067    
068            public interface AddCriteriaMethod {
069    
070                    public void addCriteria(DynamicQuery dynamicQuery);
071    
072            }
073    
074            public interface PerformActionMethod {
075    
076                    public void performAction(Object object) throws PortalException;
077    
078            }
079    
080            public interface PerformCountMethod {
081    
082                    public long performCount() throws PortalException;
083    
084            }
085    
086    }