001
014
015 package com.liferay.portlet.dynamicdatamapping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class DDMStructureServiceUtil {
035
040 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
041 long groupId, long classNameId, java.lang.String structureKey,
042 java.util.Map<java.util.Locale, java.lang.String> nameMap,
043 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
044 java.lang.String xsd, java.lang.String storageType, int type,
045 com.liferay.portal.service.ServiceContext serviceContext)
046 throws com.liferay.portal.kernel.exception.PortalException,
047 com.liferay.portal.kernel.exception.SystemException {
048 return getService()
049 .addStructure(groupId, classNameId, structureKey, nameMap,
050 descriptionMap, xsd, storageType, type, serviceContext);
051 }
052
053 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
054 long structureId,
055 java.util.Map<java.util.Locale, java.lang.String> nameMap,
056 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
057 com.liferay.portal.service.ServiceContext serviceContext)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 return getService()
061 .copyStructure(structureId, nameMap, descriptionMap,
062 serviceContext);
063 }
064
065 public static void deleteStructure(long structureId)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 getService().deleteStructure(structureId);
069 }
070
071 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure(
072 long groupId, java.lang.String structureKey)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 return getService().fetchStructure(groupId, structureKey);
076 }
077
078 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure(
079 long structureId)
080 throws com.liferay.portal.kernel.exception.PortalException,
081 com.liferay.portal.kernel.exception.SystemException {
082 return getService().getStructure(structureId);
083 }
084
085 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
086 long companyId, long[] groupIds, long[] classNameIds,
087 java.lang.String keywords, int start, int end,
088 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
089 throws com.liferay.portal.kernel.exception.SystemException {
090 return getService()
091 .search(companyId, groupIds, classNameIds, keywords, start,
092 end, orderByComparator);
093 }
094
095 public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> search(
096 long companyId, long[] groupIds, long[] classNameIds,
097 java.lang.String name, java.lang.String description,
098 java.lang.String storageType, int type, boolean andOperator, int start,
099 int end,
100 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
101 throws com.liferay.portal.kernel.exception.SystemException {
102 return getService()
103 .search(companyId, groupIds, classNameIds, name,
104 description, storageType, type, andOperator, start, end,
105 orderByComparator);
106 }
107
108 public static int searchCount(long companyId, long[] groupIds,
109 long[] classNameIds, java.lang.String keywords)
110 throws com.liferay.portal.kernel.exception.SystemException {
111 return getService()
112 .searchCount(companyId, groupIds, classNameIds, keywords);
113 }
114
115 public static int searchCount(long companyId, long[] groupIds,
116 long[] classNameIds, java.lang.String name,
117 java.lang.String description, java.lang.String storageType, int type,
118 boolean andOperator)
119 throws com.liferay.portal.kernel.exception.SystemException {
120 return getService()
121 .searchCount(companyId, groupIds, classNameIds, name,
122 description, storageType, type, andOperator);
123 }
124
125 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
126 long structureId,
127 java.util.Map<java.util.Locale, java.lang.String> nameMap,
128 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
129 java.lang.String xsd,
130 com.liferay.portal.service.ServiceContext serviceContext)
131 throws com.liferay.portal.kernel.exception.PortalException,
132 com.liferay.portal.kernel.exception.SystemException {
133 return getService()
134 .updateStructure(structureId, nameMap, descriptionMap, xsd,
135 serviceContext);
136 }
137
138 public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure(
139 long groupId, java.lang.String structureKey,
140 java.util.Map<java.util.Locale, java.lang.String> nameMap,
141 java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
142 java.lang.String xsd,
143 com.liferay.portal.service.ServiceContext serviceContext)
144 throws com.liferay.portal.kernel.exception.PortalException,
145 com.liferay.portal.kernel.exception.SystemException {
146 return getService()
147 .updateStructure(groupId, structureKey, nameMap,
148 descriptionMap, xsd, serviceContext);
149 }
150
151 public static DDMStructureService getService() {
152 if (_service == null) {
153 _service = (DDMStructureService)PortalBeanLocatorUtil.locate(DDMStructureService.class.getName());
154
155 ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
156 "_service");
157 MethodCache.remove(DDMStructureService.class);
158 }
159
160 return _service;
161 }
162
163 public void setService(DDMStructureService service) {
164 MethodCache.remove(DDMStructureService.class);
165
166 _service = service;
167
168 ReferenceRegistry.registerReference(DDMStructureServiceUtil.class,
169 "_service");
170 MethodCache.remove(DDMStructureService.class);
171 }
172
173 private static DDMStructureService _service;
174 }