1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.annotation.Isolation;
18 import com.liferay.portal.kernel.annotation.Propagation;
19 import com.liferay.portal.kernel.annotation.Transactional;
20 import com.liferay.portal.kernel.exception.PortalException;
21 import com.liferay.portal.kernel.exception.SystemException;
22
23
47 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
48 PortalException.class, SystemException.class})
49 public interface LockLocalService {
50 public com.liferay.portal.model.Lock addLock(
51 com.liferay.portal.model.Lock lock)
52 throws com.liferay.portal.kernel.exception.SystemException;
53
54 public com.liferay.portal.model.Lock createLock(long lockId);
55
56 public void deleteLock(long lockId)
57 throws com.liferay.portal.kernel.exception.PortalException,
58 com.liferay.portal.kernel.exception.SystemException;
59
60 public void deleteLock(com.liferay.portal.model.Lock lock)
61 throws com.liferay.portal.kernel.exception.SystemException;
62
63 public java.util.List<Object> dynamicQuery(
64 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65 throws com.liferay.portal.kernel.exception.SystemException;
66
67 public java.util.List<Object> dynamicQuery(
68 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69 int end) throws com.liferay.portal.kernel.exception.SystemException;
70
71 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
72 public com.liferay.portal.model.Lock getLock(long lockId)
73 throws com.liferay.portal.kernel.exception.PortalException,
74 com.liferay.portal.kernel.exception.SystemException;
75
76 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77 public java.util.List<com.liferay.portal.model.Lock> getLocks(int start,
78 int end) throws com.liferay.portal.kernel.exception.SystemException;
79
80 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81 public int getLocksCount()
82 throws com.liferay.portal.kernel.exception.SystemException;
83
84 public com.liferay.portal.model.Lock updateLock(
85 com.liferay.portal.model.Lock lock)
86 throws com.liferay.portal.kernel.exception.SystemException;
87
88 public com.liferay.portal.model.Lock updateLock(
89 com.liferay.portal.model.Lock lock, boolean merge)
90 throws com.liferay.portal.kernel.exception.SystemException;
91
92 public void clear()
93 throws com.liferay.portal.kernel.exception.SystemException;
94
95 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96 public com.liferay.portal.model.Lock getLock(java.lang.String className,
97 long key)
98 throws com.liferay.portal.kernel.exception.PortalException,
99 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 java.lang.String 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 boolean hasLock(long userId, java.lang.String className, long key)
109 throws com.liferay.portal.kernel.exception.PortalException,
110 com.liferay.portal.kernel.exception.SystemException;
111
112 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
113 public boolean hasLock(long userId, java.lang.String className,
114 java.lang.String 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 isLocked(java.lang.String className, long key)
120 throws com.liferay.portal.kernel.exception.PortalException,
121 com.liferay.portal.kernel.exception.SystemException;
122
123 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124 public boolean isLocked(java.lang.String className, java.lang.String key)
125 throws com.liferay.portal.kernel.exception.PortalException,
126 com.liferay.portal.kernel.exception.SystemException;
127
128 public com.liferay.portal.model.Lock lock(long userId,
129 java.lang.String className, long key, java.lang.String owner,
130 boolean inheritable, long expirationTime)
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, java.lang.String key,
136 java.lang.String owner, 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 refresh(java.lang.String uuid,
141 long expirationTime)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException;
144
145 public void unlock(java.lang.String className, long key)
146 throws com.liferay.portal.kernel.exception.SystemException;
147
148 public void unlock(java.lang.String className, java.lang.String key)
149 throws com.liferay.portal.kernel.exception.SystemException;
150 }