001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="PortletPersistence.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public interface PortletPersistence {
030: public com.liferay.portal.model.Portlet create(long id);
031:
032: public com.liferay.portal.model.Portlet remove(long id)
033: throws com.liferay.portal.SystemException,
034: com.liferay.portal.NoSuchPortletException;
035:
036: public com.liferay.portal.model.Portlet remove(
037: com.liferay.portal.model.Portlet portlet)
038: throws com.liferay.portal.SystemException;
039:
040: public com.liferay.portal.model.Portlet update(
041: com.liferay.portal.model.Portlet portlet)
042: throws com.liferay.portal.SystemException;
043:
044: public com.liferay.portal.model.Portlet update(
045: com.liferay.portal.model.Portlet portlet, boolean merge)
046: throws com.liferay.portal.SystemException;
047:
048: public com.liferay.portal.model.Portlet updateImpl(
049: com.liferay.portal.model.Portlet portlet, boolean merge)
050: throws com.liferay.portal.SystemException;
051:
052: public com.liferay.portal.model.Portlet findByPrimaryKey(long id)
053: throws com.liferay.portal.SystemException,
054: com.liferay.portal.NoSuchPortletException;
055:
056: public com.liferay.portal.model.Portlet fetchByPrimaryKey(long id)
057: throws com.liferay.portal.SystemException;
058:
059: public java.util.List findByCompanyId(long companyId)
060: throws com.liferay.portal.SystemException;
061:
062: public java.util.List findByCompanyId(long companyId, int begin,
063: int end) throws com.liferay.portal.SystemException;
064:
065: public java.util.List findByCompanyId(long companyId, int begin,
066: int end,
067: com.liferay.portal.kernel.util.OrderByComparator obc)
068: throws com.liferay.portal.SystemException;
069:
070: public com.liferay.portal.model.Portlet findByCompanyId_First(
071: long companyId,
072: com.liferay.portal.kernel.util.OrderByComparator obc)
073: throws com.liferay.portal.SystemException,
074: com.liferay.portal.NoSuchPortletException;
075:
076: public com.liferay.portal.model.Portlet findByCompanyId_Last(
077: long companyId,
078: com.liferay.portal.kernel.util.OrderByComparator obc)
079: throws com.liferay.portal.SystemException,
080: com.liferay.portal.NoSuchPortletException;
081:
082: public com.liferay.portal.model.Portlet[] findByCompanyId_PrevAndNext(
083: long id, long companyId,
084: com.liferay.portal.kernel.util.OrderByComparator obc)
085: throws com.liferay.portal.SystemException,
086: com.liferay.portal.NoSuchPortletException;
087:
088: public com.liferay.portal.model.Portlet findByC_P(long companyId,
089: java.lang.String portletId)
090: throws com.liferay.portal.SystemException,
091: com.liferay.portal.NoSuchPortletException;
092:
093: public com.liferay.portal.model.Portlet fetchByC_P(long companyId,
094: java.lang.String portletId)
095: throws com.liferay.portal.SystemException;
096:
097: public java.util.List findWithDynamicQuery(
098: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
099: throws com.liferay.portal.SystemException;
100:
101: public java.util.List findWithDynamicQuery(
102: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
103: int begin, int end)
104: throws com.liferay.portal.SystemException;
105:
106: public java.util.List findAll()
107: throws com.liferay.portal.SystemException;
108:
109: public java.util.List findAll(int begin, int end)
110: throws com.liferay.portal.SystemException;
111:
112: public java.util.List findAll(int begin, int end,
113: com.liferay.portal.kernel.util.OrderByComparator obc)
114: throws com.liferay.portal.SystemException;
115:
116: public void removeByCompanyId(long companyId)
117: throws com.liferay.portal.SystemException;
118:
119: public void removeByC_P(long companyId, java.lang.String portletId)
120: throws com.liferay.portal.SystemException,
121: com.liferay.portal.NoSuchPortletException;
122:
123: public void removeAll() throws com.liferay.portal.SystemException;
124:
125: public int countByCompanyId(long companyId)
126: throws com.liferay.portal.SystemException;
127:
128: public int countByC_P(long companyId, java.lang.String portletId)
129: throws com.liferay.portal.SystemException;
130:
131: public int countAll() throws com.liferay.portal.SystemException;
132: }
|