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.service;
016    
017    import com.liferay.portal.kernel.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * <p>
025     * This interface defines the service. The default implementation is
026     * {@link
027     * com.liferay.portal.service.impl.LockLocalServiceImpl}.
028     * Modify methods in that class and rerun ServiceBuilder to populate this class
029     * and all other generated classes.
030     * </p>
031     *
032     * <p>
033     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
034     * </p>
035     *
036     * @author    Brian Wing Shun Chan
037     * @see       LockLocalServiceUtil
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface LockLocalService {
043            public com.liferay.portal.model.Lock addLock(
044                    com.liferay.portal.model.Lock lock)
045                    throws com.liferay.portal.kernel.exception.SystemException;
046    
047            public com.liferay.portal.model.Lock createLock(long lockId);
048    
049            public void deleteLock(long lockId)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException;
052    
053            public void deleteLock(com.liferay.portal.model.Lock lock)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            @SuppressWarnings("unchecked")
057            public java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            @SuppressWarnings("unchecked")
062            public java.util.List dynamicQuery(
063                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
064                    int end) throws com.liferay.portal.kernel.exception.SystemException;
065    
066            @SuppressWarnings("unchecked")
067            public java.util.List dynamicQuery(
068                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
069                    int end,
070                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
071                    throws com.liferay.portal.kernel.exception.SystemException;
072    
073            public long dynamicQueryCount(
074                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
078            public com.liferay.portal.model.Lock getLock(long lockId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException;
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public java.util.List<com.liferay.portal.model.Lock> getLocks(int start,
084                    int end) throws com.liferay.portal.kernel.exception.SystemException;
085    
086            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087            public int getLocksCount()
088                    throws com.liferay.portal.kernel.exception.SystemException;
089    
090            public com.liferay.portal.model.Lock updateLock(
091                    com.liferay.portal.model.Lock lock)
092                    throws com.liferay.portal.kernel.exception.SystemException;
093    
094            public com.liferay.portal.model.Lock updateLock(
095                    com.liferay.portal.model.Lock lock, boolean merge)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            public void clear()
099                    throws com.liferay.portal.kernel.exception.SystemException;
100    
101            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
102            public com.liferay.portal.model.Lock getLock(java.lang.String className,
103                    long key)
104                    throws com.liferay.portal.kernel.exception.PortalException,
105                            com.liferay.portal.kernel.exception.SystemException;
106    
107            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108            public com.liferay.portal.model.Lock getLock(java.lang.String className,
109                    java.lang.String key)
110                    throws com.liferay.portal.kernel.exception.PortalException,
111                            com.liferay.portal.kernel.exception.SystemException;
112    
113            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114            public boolean hasLock(long userId, java.lang.String className, long key)
115                    throws com.liferay.portal.kernel.exception.PortalException,
116                            com.liferay.portal.kernel.exception.SystemException;
117    
118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119            public boolean hasLock(long userId, java.lang.String className,
120                    java.lang.String key)
121                    throws com.liferay.portal.kernel.exception.PortalException,
122                            com.liferay.portal.kernel.exception.SystemException;
123    
124            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125            public boolean isLocked(java.lang.String className, long key)
126                    throws com.liferay.portal.kernel.exception.PortalException,
127                            com.liferay.portal.kernel.exception.SystemException;
128    
129            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130            public boolean isLocked(java.lang.String className, java.lang.String key)
131                    throws com.liferay.portal.kernel.exception.PortalException,
132                            com.liferay.portal.kernel.exception.SystemException;
133    
134            public com.liferay.portal.model.Lock lock(long userId,
135                    java.lang.String className, long key, java.lang.String owner,
136                    boolean inheritable, long expirationTime)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException;
139    
140            public com.liferay.portal.model.Lock lock(long userId,
141                    java.lang.String className, java.lang.String key,
142                    java.lang.String owner, boolean inheritable, long expirationTime)
143                    throws com.liferay.portal.kernel.exception.PortalException,
144                            com.liferay.portal.kernel.exception.SystemException;
145    
146            public com.liferay.portal.model.Lock refresh(java.lang.String uuid,
147                    long expirationTime)
148                    throws com.liferay.portal.kernel.exception.PortalException,
149                            com.liferay.portal.kernel.exception.SystemException;
150    
151            public void unlock(java.lang.String className, long key)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            public void unlock(java.lang.String className, java.lang.String key)
155                    throws com.liferay.portal.kernel.exception.SystemException;
156    }