private static void _reconfigurePersistenceBeans() throws Exception {
    @SuppressWarnings("rawtypes")
    Map<String, BasePersistenceImpl> beanPersistenceImpls =
        PortalBeanLocatorUtil.locate(BasePersistenceImpl.class);

    SessionFactory sessionFactory =
        (SessionFactory) PortalBeanLocatorUtil.locate("liferaySessionFactory");

    for (String name : beanPersistenceImpls.keySet()) {
      BasePersistenceImpl<?> beanPersistenceImpl = beanPersistenceImpls.get(name);

      beanPersistenceImpl.setSessionFactory(sessionFactory);
    }
  }
  public static UserLocalService getService() {
    if (_service == null) {
      _service = (UserLocalService) PortalBeanLocatorUtil.locate(UserLocalService.class.getName());
    }

    return _service;
  }
  /** @deprecated */
  public static PmlStreetLocalService getImpl() {
    if (_impl == null) {
      _impl = (PmlStreetLocalService) PortalBeanLocatorUtil.locate(_IMPL);
    }

    return _impl;
  }
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (UserTrackerPersistence)
            PortalBeanLocatorUtil.locate(UserTrackerPersistence.class.getName());
  }
  /** @deprecated */
  public static LoaiVanBanNoiBoCuaSoService getImpl() {
    if (_impl == null) {
      _impl = (LoaiVanBanNoiBoCuaSoService) PortalBeanLocatorUtil.locate(_IMPL);
    }

    return _impl;
  }
  public static UserFinder getFinder() {
    if (_finder == null) {
      _finder = (UserFinder) PortalBeanLocatorUtil.locate(UserFinder.class.getName());
    }

    return _finder;
  }
  public static PollsVoteService getService() {
    if (_service == null) {
      _service = (PollsVoteService) PortalBeanLocatorUtil.locate(PollsVoteService.class.getName());
    }

    return _service;
  }
  /** @deprecated */
  public static PmlDocumentSendLogService getImpl() {
    if (_impl == null) {
      _impl = (PmlDocumentSendLogService) PortalBeanLocatorUtil.locate(_IMPL);
    }

    return _impl;
  }
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (JournalFeedPersistence)
            PortalBeanLocatorUtil.locate(JournalFeedPersistence.class.getName());
  }
  public static JCRFactory getJCRFactory() {
    if (_jcrFactory == null) {
      _jcrFactory = (JCRFactory) PortalBeanLocatorUtil.locate(JCRFactory.class.getName());
    }

    return _jcrFactory;
  }
  @Override
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (CounterPersistence) PortalBeanLocatorUtil.locate(CounterPersistence.class.getName());
  }
  private static LoaiPhongVanBanNoiBoLocalServiceFactory _getFactory() {
    if (_factory == null) {
      _factory = (LoaiPhongVanBanNoiBoLocalServiceFactory) PortalBeanLocatorUtil.locate(_FACTORY);
    }

    return _factory;
  }
  /** @deprecated */
  public static PmlTeamService getTxImpl() {
    if (_txImpl == null) {
      _txImpl = (PmlTeamService) PortalBeanLocatorUtil.locate(_TX_IMPL);
    }

    return _txImpl;
  }
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (ClusterGroupPersistence)
            PortalBeanLocatorUtil.locate(ClusterGroupPersistence.class.getName());
  }
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (MBMessageFlagPersistence)
            PortalBeanLocatorUtil.locate(MBMessageFlagPersistence.class.getName());
  }
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (SocialEquityLogPersistence)
            PortalBeanLocatorUtil.locate(SocialEquityLogPersistence.class.getName());
  }
  private static PmlTeamServiceFactory _getFactory() {
    if (_factory == null) {
      _factory = (PmlTeamServiceFactory) PortalBeanLocatorUtil.locate(_FACTORY);
    }

    return _factory;
  }
  /** @deprecated */
  public static LoaiPhongVanBanNoiBoLocalService getTxImpl() {
    if (_txImpl == null) {
      _txImpl = (LoaiPhongVanBanNoiBoLocalService) PortalBeanLocatorUtil.locate(_TX_IMPL);
    }

    return _txImpl;
  }
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (SCFrameworkVersionPersistence)
            PortalBeanLocatorUtil.locate(SCFrameworkVersionPersistence.class.getName());
  }
  public static CyrusUserPersistence getPersistence() {
    if (_persistence == null) {
      _persistence =
          (CyrusUserPersistence) PortalBeanLocatorUtil.locate(CyrusUserPersistence.class.getName());
    }

    return _persistence;
  }
  public static BlogsEntryService getService() {
    if (_service == null) {
      _service =
          (BlogsEntryService) PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName());
    }

    return _service;
  }
Exemple #22
0
  public static AssetTagPersistence getPersistence() {
    if (_persistence == null) {
      _persistence =
          (AssetTagPersistence) PortalBeanLocatorUtil.locate(AssetTagPersistence.class.getName());
    }

    return _persistence;
  }
  @BeforeClass
  public static void setUpClass() {
    SessionFactoryImpl sessionFactoryImpl =
        (SessionFactoryImpl) PortalBeanLocatorUtil.locate("liferaySessionFactory");

    _sessionFactoryImpl =
        (org.hibernate.impl.SessionFactoryImpl) sessionFactoryImpl.getSessionFactoryImplementor();
  }
  public static ExpandoValueService getService() {
    if (_service == null) {
      _service =
          (ExpandoValueService) PortalBeanLocatorUtil.locate(ExpandoValueService.class.getName());
    }

    return _service;
  }
  @Override
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (DDMStructureLinkPersistence)
            PortalBeanLocatorUtil.locate(DDMStructureLinkPersistence.class.getName());
  }
  @Override
  public void setUp() throws Exception {
    super.setUp();

    _persistence =
        (WikiPageResourcePersistence)
            PortalBeanLocatorUtil.locate(WikiPageResourcePersistence.class.getName());
  }
  public static ClassNameService getService() {
    if (_service == null) {
      _service = (ClassNameService) PortalBeanLocatorUtil.locate(ClassNameService.class.getName());

      ReferenceRegistry.registerReference(ClassNameServiceUtil.class, "_service");
    }

    return _service;
  }
  public static MBMessageFinder getFinder() {
    if (_finder == null) {
      _finder = (MBMessageFinder) PortalBeanLocatorUtil.locate(MBMessageFinder.class.getName());

      ReferenceRegistry.registerReference(MBMessageFinderUtil.class, "_finder");
    }

    return _finder;
  }
  public static RatingsStatsPersistence getPersistence() {
    if (_persistence == null) {
      _persistence =
          (RatingsStatsPersistence)
              PortalBeanLocatorUtil.locate(RatingsStatsPersistence.class.getName());
    }

    return _persistence;
  }
  public static SCProductScreenshotPersistence getPersistence() {
    if (_persistence == null) {
      _persistence =
          (SCProductScreenshotPersistence)
              PortalBeanLocatorUtil.locate(SCProductScreenshotPersistence.class.getName());
    }

    return _persistence;
  }