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="ResourcePersistence.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public interface ResourcePersistence {
030: public com.liferay.portal.model.Resource create(long resourceId);
031:
032: public com.liferay.portal.model.Resource remove(long resourceId)
033: throws com.liferay.portal.SystemException,
034: com.liferay.portal.NoSuchResourceException;
035:
036: public com.liferay.portal.model.Resource remove(
037: com.liferay.portal.model.Resource resource)
038: throws com.liferay.portal.SystemException;
039:
040: public com.liferay.portal.model.Resource update(
041: com.liferay.portal.model.Resource resource)
042: throws com.liferay.portal.SystemException;
043:
044: public com.liferay.portal.model.Resource update(
045: com.liferay.portal.model.Resource resource, boolean merge)
046: throws com.liferay.portal.SystemException;
047:
048: public com.liferay.portal.model.Resource updateImpl(
049: com.liferay.portal.model.Resource resource, boolean merge)
050: throws com.liferay.portal.SystemException;
051:
052: public com.liferay.portal.model.Resource findByPrimaryKey(
053: long resourceId) throws com.liferay.portal.SystemException,
054: com.liferay.portal.NoSuchResourceException;
055:
056: public com.liferay.portal.model.Resource fetchByPrimaryKey(
057: long resourceId) throws com.liferay.portal.SystemException;
058:
059: public java.util.List findByCodeId(long codeId)
060: throws com.liferay.portal.SystemException;
061:
062: public java.util.List findByCodeId(long codeId, int begin, int end)
063: throws com.liferay.portal.SystemException;
064:
065: public java.util.List findByCodeId(long codeId, int begin, int end,
066: com.liferay.portal.kernel.util.OrderByComparator obc)
067: throws com.liferay.portal.SystemException;
068:
069: public com.liferay.portal.model.Resource findByCodeId_First(
070: long codeId,
071: com.liferay.portal.kernel.util.OrderByComparator obc)
072: throws com.liferay.portal.SystemException,
073: com.liferay.portal.NoSuchResourceException;
074:
075: public com.liferay.portal.model.Resource findByCodeId_Last(
076: long codeId,
077: com.liferay.portal.kernel.util.OrderByComparator obc)
078: throws com.liferay.portal.SystemException,
079: com.liferay.portal.NoSuchResourceException;
080:
081: public com.liferay.portal.model.Resource[] findByCodeId_PrevAndNext(
082: long resourceId, long codeId,
083: com.liferay.portal.kernel.util.OrderByComparator obc)
084: throws com.liferay.portal.SystemException,
085: com.liferay.portal.NoSuchResourceException;
086:
087: public com.liferay.portal.model.Resource findByC_P(long codeId,
088: java.lang.String primKey)
089: throws com.liferay.portal.SystemException,
090: com.liferay.portal.NoSuchResourceException;
091:
092: public com.liferay.portal.model.Resource fetchByC_P(long codeId,
093: java.lang.String primKey)
094: throws com.liferay.portal.SystemException;
095:
096: public java.util.List findWithDynamicQuery(
097: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
098: throws com.liferay.portal.SystemException;
099:
100: public java.util.List findWithDynamicQuery(
101: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
102: int begin, int end)
103: throws com.liferay.portal.SystemException;
104:
105: public java.util.List findAll()
106: throws com.liferay.portal.SystemException;
107:
108: public java.util.List findAll(int begin, int end)
109: throws com.liferay.portal.SystemException;
110:
111: public java.util.List findAll(int begin, int end,
112: com.liferay.portal.kernel.util.OrderByComparator obc)
113: throws com.liferay.portal.SystemException;
114:
115: public void removeByCodeId(long codeId)
116: throws com.liferay.portal.SystemException;
117:
118: public void removeByC_P(long codeId, java.lang.String primKey)
119: throws com.liferay.portal.SystemException,
120: com.liferay.portal.NoSuchResourceException;
121:
122: public void removeAll() throws com.liferay.portal.SystemException;
123:
124: public int countByCodeId(long codeId)
125: throws com.liferay.portal.SystemException;
126:
127: public int countByC_P(long codeId, java.lang.String primKey)
128: throws com.liferay.portal.SystemException;
129:
130: public int countAll() throws com.liferay.portal.SystemException;
131: }
|