001
014
015 package com.liferay.portlet.expando.util;
016
017 import com.liferay.portal.security.auth.CompanyThreadLocal;
018 import com.liferay.portlet.expando.model.ExpandoBridge;
019
020
023 public class ExpandoBridgeFactoryUtil {
024
025 public static ExpandoBridge getExpandoBridge(
026 long companyId, String className) {
027
028 return getExpandoBridgeFactory().getExpandoBridge(companyId, className);
029 }
030
031 public static ExpandoBridge getExpandoBridge(
032 long companyId, String className, long classPK) {
033
034 return getExpandoBridgeFactory().getExpandoBridge(
035 companyId, className, classPK);
036 }
037
038
041 public static ExpandoBridge getExpandoBridge(String className) {
042 long companyId = CompanyThreadLocal.getCompanyId();
043
044 return getExpandoBridge(companyId, className);
045 }
046
047
050 public static ExpandoBridge getExpandoBridge(
051 String className, long classPK) {
052
053 long companyId = CompanyThreadLocal.getCompanyId();
054
055 return getExpandoBridge(companyId, className, classPK);
056 }
057
058 public static ExpandoBridgeFactory getExpandoBridgeFactory() {
059 return _expandoBridgeFactory;
060 }
061
062 public void setExpandoBridgeFactory(
063 ExpandoBridgeFactory expandoBridgeFactory) {
064
065 _expandoBridgeFactory = expandoBridgeFactory;
066 }
067
068 private static ExpandoBridgeFactory _expandoBridgeFactory;
069
070 }