1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.expando.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  import com.liferay.portal.kernel.util.IntegerWrapper;
28  import com.liferay.portal.kernel.util.LongWrapper;
29  import com.liferay.portal.kernel.util.MethodWrapper;
30  import com.liferay.portal.kernel.util.NullWrapper;
31  import com.liferay.portal.security.auth.HttpPrincipal;
32  import com.liferay.portal.service.http.TunnelUtil;
33  
34  import com.liferay.portlet.expando.service.ExpandoColumnServiceUtil;
35  
36  /**
37   * <a href="ExpandoColumnServiceHttp.java.html"><b><i>View Source</i></b></a>
38   *
39   * <p>
40   * ServiceBuilder generated this class. Modifications in this class will be
41   * overwritten the next time is generated.
42   * </p>
43   *
44   * <p>
45   * This class provides a HTTP utility for the
46   * <code>com.liferay.portlet.expando.service.ExpandoColumnServiceUtil</code> service
47   * utility. The static methods of this class calls the same methods of the
48   * service utility. However, the signatures are different because it requires an
49   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
50   * parameter.
51   * </p>
52   *
53   * <p>
54   * The benefits of using the HTTP utility is that it is fast and allows for
55   * tunneling without the cost of serializing to text. The drawback is that it
56   * only works with Java.
57   * </p>
58   *
59   * <p>
60   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
61   * portal.properties to configure security.
62   * </p>
63   *
64   * <p>
65   * The HTTP utility is only generated for remote services.
66   * </p>
67   *
68   * @author Brian Wing Shun Chan
69   *
70   * @see com.liferay.portal.security.auth.HttpPrincipal
71   * @see com.liferay.portlet.expando.service.ExpandoColumnServiceUtil
72   * @see com.liferay.portlet.expando.service.http.ExpandoColumnServiceSoap
73   *
74   */
75  public class ExpandoColumnServiceHttp {
76      public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
77          HttpPrincipal httpPrincipal, long tableId, java.lang.String name,
78          int type)
79          throws com.liferay.portal.SystemException,
80              com.liferay.portal.PortalException {
81          try {
82              Object paramObj0 = new LongWrapper(tableId);
83  
84              Object paramObj1 = name;
85  
86              if (name == null) {
87                  paramObj1 = new NullWrapper("java.lang.String");
88              }
89  
90              Object paramObj2 = new IntegerWrapper(type);
91  
92              MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
93                      "addColumn",
94                      new Object[] { paramObj0, paramObj1, paramObj2 });
95  
96              Object returnObj = null;
97  
98              try {
99                  returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
100             }
101             catch (Exception e) {
102                 if (e instanceof com.liferay.portal.SystemException) {
103                     throw (com.liferay.portal.SystemException)e;
104                 }
105 
106                 if (e instanceof com.liferay.portal.PortalException) {
107                     throw (com.liferay.portal.PortalException)e;
108                 }
109 
110                 throw new com.liferay.portal.SystemException(e);
111             }
112 
113             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
114         }
115         catch (com.liferay.portal.SystemException se) {
116             _log.error(se, se);
117 
118             throw se;
119         }
120     }
121 
122     public static void deleteColumn(HttpPrincipal httpPrincipal, long columnId)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portal.PortalException {
125         try {
126             Object paramObj0 = new LongWrapper(columnId);
127 
128             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
129                     "deleteColumn", new Object[] { paramObj0 });
130 
131             try {
132                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
133             }
134             catch (Exception e) {
135                 if (e instanceof com.liferay.portal.SystemException) {
136                     throw (com.liferay.portal.SystemException)e;
137                 }
138 
139                 if (e instanceof com.liferay.portal.PortalException) {
140                     throw (com.liferay.portal.PortalException)e;
141                 }
142 
143                 throw new com.liferay.portal.SystemException(e);
144             }
145         }
146         catch (com.liferay.portal.SystemException se) {
147             _log.error(se, se);
148 
149             throw se;
150         }
151     }
152 
153     public static void deleteColumns(HttpPrincipal httpPrincipal, long tableId)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portal.PortalException {
156         try {
157             Object paramObj0 = new LongWrapper(tableId);
158 
159             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
160                     "deleteColumns", new Object[] { paramObj0 });
161 
162             try {
163                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
164             }
165             catch (Exception e) {
166                 if (e instanceof com.liferay.portal.SystemException) {
167                     throw (com.liferay.portal.SystemException)e;
168                 }
169 
170                 if (e instanceof com.liferay.portal.PortalException) {
171                     throw (com.liferay.portal.PortalException)e;
172                 }
173 
174                 throw new com.liferay.portal.SystemException(e);
175             }
176         }
177         catch (com.liferay.portal.SystemException se) {
178             _log.error(se, se);
179 
180             throw se;
181         }
182     }
183 
184     public static void deleteColumns(HttpPrincipal httpPrincipal,
185         java.lang.String className, java.lang.String tableName)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portal.PortalException {
188         try {
189             Object paramObj0 = className;
190 
191             if (className == null) {
192                 paramObj0 = new NullWrapper("java.lang.String");
193             }
194 
195             Object paramObj1 = tableName;
196 
197             if (tableName == null) {
198                 paramObj1 = new NullWrapper("java.lang.String");
199             }
200 
201             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
202                     "deleteColumns", new Object[] { paramObj0, paramObj1 });
203 
204             try {
205                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
206             }
207             catch (Exception e) {
208                 if (e instanceof com.liferay.portal.SystemException) {
209                     throw (com.liferay.portal.SystemException)e;
210                 }
211 
212                 if (e instanceof com.liferay.portal.PortalException) {
213                     throw (com.liferay.portal.PortalException)e;
214                 }
215 
216                 throw new com.liferay.portal.SystemException(e);
217             }
218         }
219         catch (com.liferay.portal.SystemException se) {
220             _log.error(se, se);
221 
222             throw se;
223         }
224     }
225 
226     public static void deleteColumns(HttpPrincipal httpPrincipal,
227         long classNameId, java.lang.String tableName)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portal.PortalException {
230         try {
231             Object paramObj0 = new LongWrapper(classNameId);
232 
233             Object paramObj1 = tableName;
234 
235             if (tableName == null) {
236                 paramObj1 = new NullWrapper("java.lang.String");
237             }
238 
239             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
240                     "deleteColumns", new Object[] { paramObj0, paramObj1 });
241 
242             try {
243                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
244             }
245             catch (Exception e) {
246                 if (e instanceof com.liferay.portal.SystemException) {
247                     throw (com.liferay.portal.SystemException)e;
248                 }
249 
250                 if (e instanceof com.liferay.portal.PortalException) {
251                     throw (com.liferay.portal.PortalException)e;
252                 }
253 
254                 throw new com.liferay.portal.SystemException(e);
255             }
256         }
257         catch (com.liferay.portal.SystemException se) {
258             _log.error(se, se);
259 
260             throw se;
261         }
262     }
263 
264     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
265         HttpPrincipal httpPrincipal, long columnId)
266         throws com.liferay.portal.SystemException,
267             com.liferay.portal.PortalException {
268         try {
269             Object paramObj0 = new LongWrapper(columnId);
270 
271             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
272                     "getColumn", new Object[] { paramObj0 });
273 
274             Object returnObj = null;
275 
276             try {
277                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
278             }
279             catch (Exception e) {
280                 if (e instanceof com.liferay.portal.SystemException) {
281                     throw (com.liferay.portal.SystemException)e;
282                 }
283 
284                 if (e instanceof com.liferay.portal.PortalException) {
285                     throw (com.liferay.portal.PortalException)e;
286                 }
287 
288                 throw new com.liferay.portal.SystemException(e);
289             }
290 
291             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
292         }
293         catch (com.liferay.portal.SystemException se) {
294             _log.error(se, se);
295 
296             throw se;
297         }
298     }
299 
300     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
301         HttpPrincipal httpPrincipal, long tableId, java.lang.String name)
302         throws com.liferay.portal.SystemException,
303             com.liferay.portal.PortalException {
304         try {
305             Object paramObj0 = new LongWrapper(tableId);
306 
307             Object paramObj1 = name;
308 
309             if (name == null) {
310                 paramObj1 = new NullWrapper("java.lang.String");
311             }
312 
313             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
314                     "getColumn", new Object[] { paramObj0, paramObj1 });
315 
316             Object returnObj = null;
317 
318             try {
319                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
320             }
321             catch (Exception e) {
322                 if (e instanceof com.liferay.portal.SystemException) {
323                     throw (com.liferay.portal.SystemException)e;
324                 }
325 
326                 if (e instanceof com.liferay.portal.PortalException) {
327                     throw (com.liferay.portal.PortalException)e;
328                 }
329 
330                 throw new com.liferay.portal.SystemException(e);
331             }
332 
333             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
334         }
335         catch (com.liferay.portal.SystemException se) {
336             _log.error(se, se);
337 
338             throw se;
339         }
340     }
341 
342     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
343         HttpPrincipal httpPrincipal, java.lang.String className,
344         java.lang.String tableName, java.lang.String name)
345         throws com.liferay.portal.SystemException,
346             com.liferay.portal.PortalException {
347         try {
348             Object paramObj0 = className;
349 
350             if (className == null) {
351                 paramObj0 = new NullWrapper("java.lang.String");
352             }
353 
354             Object paramObj1 = tableName;
355 
356             if (tableName == null) {
357                 paramObj1 = new NullWrapper("java.lang.String");
358             }
359 
360             Object paramObj2 = name;
361 
362             if (name == null) {
363                 paramObj2 = new NullWrapper("java.lang.String");
364             }
365 
366             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
367                     "getColumn",
368                     new Object[] { paramObj0, paramObj1, paramObj2 });
369 
370             Object returnObj = null;
371 
372             try {
373                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
374             }
375             catch (Exception e) {
376                 if (e instanceof com.liferay.portal.SystemException) {
377                     throw (com.liferay.portal.SystemException)e;
378                 }
379 
380                 if (e instanceof com.liferay.portal.PortalException) {
381                     throw (com.liferay.portal.PortalException)e;
382                 }
383 
384                 throw new com.liferay.portal.SystemException(e);
385             }
386 
387             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
388         }
389         catch (com.liferay.portal.SystemException se) {
390             _log.error(se, se);
391 
392             throw se;
393         }
394     }
395 
396     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
397         HttpPrincipal httpPrincipal, long classNameId,
398         java.lang.String tableName, java.lang.String name)
399         throws com.liferay.portal.SystemException,
400             com.liferay.portal.PortalException {
401         try {
402             Object paramObj0 = new LongWrapper(classNameId);
403 
404             Object paramObj1 = tableName;
405 
406             if (tableName == null) {
407                 paramObj1 = new NullWrapper("java.lang.String");
408             }
409 
410             Object paramObj2 = name;
411 
412             if (name == null) {
413                 paramObj2 = new NullWrapper("java.lang.String");
414             }
415 
416             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
417                     "getColumn",
418                     new Object[] { paramObj0, paramObj1, paramObj2 });
419 
420             Object returnObj = null;
421 
422             try {
423                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
424             }
425             catch (Exception e) {
426                 if (e instanceof com.liferay.portal.SystemException) {
427                     throw (com.liferay.portal.SystemException)e;
428                 }
429 
430                 if (e instanceof com.liferay.portal.PortalException) {
431                     throw (com.liferay.portal.PortalException)e;
432                 }
433 
434                 throw new com.liferay.portal.SystemException(e);
435             }
436 
437             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
438         }
439         catch (com.liferay.portal.SystemException se) {
440             _log.error(se, se);
441 
442             throw se;
443         }
444     }
445 
446     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
447         HttpPrincipal httpPrincipal, long tableId)
448         throws com.liferay.portal.SystemException {
449         try {
450             Object paramObj0 = new LongWrapper(tableId);
451 
452             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
453                     "getColumns", new Object[] { paramObj0 });
454 
455             Object returnObj = null;
456 
457             try {
458                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
459             }
460             catch (Exception e) {
461                 if (e instanceof com.liferay.portal.SystemException) {
462                     throw (com.liferay.portal.SystemException)e;
463                 }
464 
465                 throw new com.liferay.portal.SystemException(e);
466             }
467 
468             return (java.util.List<com.liferay.portlet.expando.model.ExpandoColumn>)returnObj;
469         }
470         catch (com.liferay.portal.SystemException se) {
471             _log.error(se, se);
472 
473             throw se;
474         }
475     }
476 
477     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
478         HttpPrincipal httpPrincipal, java.lang.String className,
479         java.lang.String tableName) throws com.liferay.portal.SystemException {
480         try {
481             Object paramObj0 = className;
482 
483             if (className == null) {
484                 paramObj0 = new NullWrapper("java.lang.String");
485             }
486 
487             Object paramObj1 = tableName;
488 
489             if (tableName == null) {
490                 paramObj1 = new NullWrapper("java.lang.String");
491             }
492 
493             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
494                     "getColumns", new Object[] { paramObj0, paramObj1 });
495 
496             Object returnObj = null;
497 
498             try {
499                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
500             }
501             catch (Exception e) {
502                 if (e instanceof com.liferay.portal.SystemException) {
503                     throw (com.liferay.portal.SystemException)e;
504                 }
505 
506                 throw new com.liferay.portal.SystemException(e);
507             }
508 
509             return (java.util.List<com.liferay.portlet.expando.model.ExpandoColumn>)returnObj;
510         }
511         catch (com.liferay.portal.SystemException se) {
512             _log.error(se, se);
513 
514             throw se;
515         }
516     }
517 
518     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
519         HttpPrincipal httpPrincipal, long classNameId,
520         java.lang.String tableName) throws com.liferay.portal.SystemException {
521         try {
522             Object paramObj0 = new LongWrapper(classNameId);
523 
524             Object paramObj1 = tableName;
525 
526             if (tableName == null) {
527                 paramObj1 = new NullWrapper("java.lang.String");
528             }
529 
530             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
531                     "getColumns", new Object[] { paramObj0, paramObj1 });
532 
533             Object returnObj = null;
534 
535             try {
536                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
537             }
538             catch (Exception e) {
539                 if (e instanceof com.liferay.portal.SystemException) {
540                     throw (com.liferay.portal.SystemException)e;
541                 }
542 
543                 throw new com.liferay.portal.SystemException(e);
544             }
545 
546             return (java.util.List<com.liferay.portlet.expando.model.ExpandoColumn>)returnObj;
547         }
548         catch (com.liferay.portal.SystemException se) {
549             _log.error(se, se);
550 
551             throw se;
552         }
553     }
554 
555     public static int getColumnsCount(HttpPrincipal httpPrincipal, long tableId)
556         throws com.liferay.portal.SystemException {
557         try {
558             Object paramObj0 = new LongWrapper(tableId);
559 
560             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
561                     "getColumnsCount", new Object[] { paramObj0 });
562 
563             Object returnObj = null;
564 
565             try {
566                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
567             }
568             catch (Exception e) {
569                 if (e instanceof com.liferay.portal.SystemException) {
570                     throw (com.liferay.portal.SystemException)e;
571                 }
572 
573                 throw new com.liferay.portal.SystemException(e);
574             }
575 
576             return ((Integer)returnObj).intValue();
577         }
578         catch (com.liferay.portal.SystemException se) {
579             _log.error(se, se);
580 
581             throw se;
582         }
583     }
584 
585     public static int getColumnsCount(HttpPrincipal httpPrincipal,
586         java.lang.String className, java.lang.String tableName)
587         throws com.liferay.portal.SystemException {
588         try {
589             Object paramObj0 = className;
590 
591             if (className == null) {
592                 paramObj0 = new NullWrapper("java.lang.String");
593             }
594 
595             Object paramObj1 = tableName;
596 
597             if (tableName == null) {
598                 paramObj1 = new NullWrapper("java.lang.String");
599             }
600 
601             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
602                     "getColumnsCount", new Object[] { paramObj0, paramObj1 });
603 
604             Object returnObj = null;
605 
606             try {
607                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
608             }
609             catch (Exception e) {
610                 if (e instanceof com.liferay.portal.SystemException) {
611                     throw (com.liferay.portal.SystemException)e;
612                 }
613 
614                 throw new com.liferay.portal.SystemException(e);
615             }
616 
617             return ((Integer)returnObj).intValue();
618         }
619         catch (com.liferay.portal.SystemException se) {
620             _log.error(se, se);
621 
622             throw se;
623         }
624     }
625 
626     public static int getColumnsCount(HttpPrincipal httpPrincipal,
627         long classNameId, java.lang.String tableName)
628         throws com.liferay.portal.SystemException {
629         try {
630             Object paramObj0 = new LongWrapper(classNameId);
631 
632             Object paramObj1 = tableName;
633 
634             if (tableName == null) {
635                 paramObj1 = new NullWrapper("java.lang.String");
636             }
637 
638             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
639                     "getColumnsCount", new Object[] { paramObj0, paramObj1 });
640 
641             Object returnObj = null;
642 
643             try {
644                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
645             }
646             catch (Exception e) {
647                 if (e instanceof com.liferay.portal.SystemException) {
648                     throw (com.liferay.portal.SystemException)e;
649                 }
650 
651                 throw new com.liferay.portal.SystemException(e);
652             }
653 
654             return ((Integer)returnObj).intValue();
655         }
656         catch (com.liferay.portal.SystemException se) {
657             _log.error(se, se);
658 
659             throw se;
660         }
661     }
662 
663     public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
664         HttpPrincipal httpPrincipal, java.lang.String className,
665         java.lang.String name)
666         throws com.liferay.portal.SystemException,
667             com.liferay.portal.PortalException {
668         try {
669             Object paramObj0 = className;
670 
671             if (className == null) {
672                 paramObj0 = new NullWrapper("java.lang.String");
673             }
674 
675             Object paramObj1 = name;
676 
677             if (name == null) {
678                 paramObj1 = new NullWrapper("java.lang.String");
679             }
680 
681             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
682                     "getDefaultTableColumn",
683                     new Object[] { paramObj0, paramObj1 });
684 
685             Object returnObj = null;
686 
687             try {
688                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
689             }
690             catch (Exception e) {
691                 if (e instanceof com.liferay.portal.SystemException) {
692                     throw (com.liferay.portal.SystemException)e;
693                 }
694 
695                 if (e instanceof com.liferay.portal.PortalException) {
696                     throw (com.liferay.portal.PortalException)e;
697                 }
698 
699                 throw new com.liferay.portal.SystemException(e);
700             }
701 
702             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
703         }
704         catch (com.liferay.portal.SystemException se) {
705             _log.error(se, se);
706 
707             throw se;
708         }
709     }
710 
711     public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
712         HttpPrincipal httpPrincipal, long classNameId, java.lang.String name)
713         throws com.liferay.portal.SystemException,
714             com.liferay.portal.PortalException {
715         try {
716             Object paramObj0 = new LongWrapper(classNameId);
717 
718             Object paramObj1 = name;
719 
720             if (name == null) {
721                 paramObj1 = new NullWrapper("java.lang.String");
722             }
723 
724             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
725                     "getDefaultTableColumn",
726                     new Object[] { paramObj0, paramObj1 });
727 
728             Object returnObj = null;
729 
730             try {
731                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
732             }
733             catch (Exception e) {
734                 if (e instanceof com.liferay.portal.SystemException) {
735                     throw (com.liferay.portal.SystemException)e;
736                 }
737 
738                 if (e instanceof com.liferay.portal.PortalException) {
739                     throw (com.liferay.portal.PortalException)e;
740                 }
741 
742                 throw new com.liferay.portal.SystemException(e);
743             }
744 
745             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
746         }
747         catch (com.liferay.portal.SystemException se) {
748             _log.error(se, se);
749 
750             throw se;
751         }
752     }
753 
754     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
755         HttpPrincipal httpPrincipal, java.lang.String className)
756         throws com.liferay.portal.SystemException {
757         try {
758             Object paramObj0 = className;
759 
760             if (className == null) {
761                 paramObj0 = new NullWrapper("java.lang.String");
762             }
763 
764             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
765                     "getDefaultTableColumns", new Object[] { paramObj0 });
766 
767             Object returnObj = null;
768 
769             try {
770                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
771             }
772             catch (Exception e) {
773                 if (e instanceof com.liferay.portal.SystemException) {
774                     throw (com.liferay.portal.SystemException)e;
775                 }
776 
777                 throw new com.liferay.portal.SystemException(e);
778             }
779 
780             return (java.util.List<com.liferay.portlet.expando.model.ExpandoColumn>)returnObj;
781         }
782         catch (com.liferay.portal.SystemException se) {
783             _log.error(se, se);
784 
785             throw se;
786         }
787     }
788 
789     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
790         HttpPrincipal httpPrincipal, long classNameId)
791         throws com.liferay.portal.SystemException {
792         try {
793             Object paramObj0 = new LongWrapper(classNameId);
794 
795             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
796                     "getDefaultTableColumns", new Object[] { paramObj0 });
797 
798             Object returnObj = null;
799 
800             try {
801                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
802             }
803             catch (Exception e) {
804                 if (e instanceof com.liferay.portal.SystemException) {
805                     throw (com.liferay.portal.SystemException)e;
806                 }
807 
808                 throw new com.liferay.portal.SystemException(e);
809             }
810 
811             return (java.util.List<com.liferay.portlet.expando.model.ExpandoColumn>)returnObj;
812         }
813         catch (com.liferay.portal.SystemException se) {
814             _log.error(se, se);
815 
816             throw se;
817         }
818     }
819 
820     public static int getDefaultTableColumnsCount(HttpPrincipal httpPrincipal,
821         java.lang.String className) throws com.liferay.portal.SystemException {
822         try {
823             Object paramObj0 = className;
824 
825             if (className == null) {
826                 paramObj0 = new NullWrapper("java.lang.String");
827             }
828 
829             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
830                     "getDefaultTableColumnsCount", new Object[] { paramObj0 });
831 
832             Object returnObj = null;
833 
834             try {
835                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
836             }
837             catch (Exception e) {
838                 if (e instanceof com.liferay.portal.SystemException) {
839                     throw (com.liferay.portal.SystemException)e;
840                 }
841 
842                 throw new com.liferay.portal.SystemException(e);
843             }
844 
845             return ((Integer)returnObj).intValue();
846         }
847         catch (com.liferay.portal.SystemException se) {
848             _log.error(se, se);
849 
850             throw se;
851         }
852     }
853 
854     public static int getDefaultTableColumnsCount(HttpPrincipal httpPrincipal,
855         long classNameId) throws com.liferay.portal.SystemException {
856         try {
857             Object paramObj0 = new LongWrapper(classNameId);
858 
859             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
860                     "getDefaultTableColumnsCount", new Object[] { paramObj0 });
861 
862             Object returnObj = null;
863 
864             try {
865                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
866             }
867             catch (Exception e) {
868                 if (e instanceof com.liferay.portal.SystemException) {
869                     throw (com.liferay.portal.SystemException)e;
870                 }
871 
872                 throw new com.liferay.portal.SystemException(e);
873             }
874 
875             return ((Integer)returnObj).intValue();
876         }
877         catch (com.liferay.portal.SystemException se) {
878             _log.error(se, se);
879 
880             throw se;
881         }
882     }
883 
884     public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
885         HttpPrincipal httpPrincipal, long columnId, java.lang.String name,
886         int type)
887         throws com.liferay.portal.SystemException,
888             com.liferay.portal.PortalException {
889         try {
890             Object paramObj0 = new LongWrapper(columnId);
891 
892             Object paramObj1 = name;
893 
894             if (name == null) {
895                 paramObj1 = new NullWrapper("java.lang.String");
896             }
897 
898             Object paramObj2 = new IntegerWrapper(type);
899 
900             MethodWrapper methodWrapper = new MethodWrapper(ExpandoColumnServiceUtil.class.getName(),
901                     "updateColumn",
902                     new Object[] { paramObj0, paramObj1, paramObj2 });
903 
904             Object returnObj = null;
905 
906             try {
907                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
908             }
909             catch (Exception e) {
910                 if (e instanceof com.liferay.portal.SystemException) {
911                     throw (com.liferay.portal.SystemException)e;
912                 }
913 
914                 if (e instanceof com.liferay.portal.PortalException) {
915                     throw (com.liferay.portal.PortalException)e;
916                 }
917 
918                 throw new com.liferay.portal.SystemException(e);
919             }
920 
921             return (com.liferay.portlet.expando.model.ExpandoColumn)returnObj;
922         }
923         catch (com.liferay.portal.SystemException se) {
924             _log.error(se, se);
925 
926             throw se;
927         }
928     }
929 
930     private static Log _log = LogFactoryUtil.getLog(ExpandoColumnServiceHttp.class);
931 }