Example usage for com.liferay.portal.kernel.service PersistedModelLocalService PersistedModelLocalService

List of usage examples for com.liferay.portal.kernel.service PersistedModelLocalService PersistedModelLocalService

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service PersistedModelLocalService PersistedModelLocalService.

Prototype

PersistedModelLocalService

Source Link

Usage

From source file:com.liferay.exportimport.data.handler.test.DummyFolderStagedModelDataHandlerTest.java

License:Open Source License

@Before
@Override//w ww .  j  av a 2  s . c  o m
public void setUp() throws Exception {
    super.setUp();

    _dummyFolderStagedModelRepository = (StagedModelRepository<DummyFolder>) StagedModelRepositoryRegistryUtil
            .getStagedModelRepository(DummyFolder.class.getName());

    PersistedModelLocalServiceRegistryUtil.register(DummyFolder.class.getName(),
            new PersistedModelLocalService() {

                @Override
                public PersistedModel deletePersistedModel(PersistedModel persistedModel)
                        throws PortalException {

                    return null;
                }

                @Override
                public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException {

                    return null;
                }

            });
}

From source file:com.liferay.exportimport.data.handler.test.DummyStagedModelDataHandlerTest.java

License:Open Source License

@Before
@Override//  w  w  w .  j a v a2s .c  om
public void setUp() throws Exception {
    super.setUp();

    _dummyStagedModelRepository = (StagedModelRepository<Dummy>) StagedModelRepositoryRegistryUtil
            .getStagedModelRepository(Dummy.class.getName());

    _dummyFolderStagedModelRepository = (StagedModelRepository<DummyFolder>) StagedModelRepositoryRegistryUtil
            .getStagedModelRepository(DummyFolder.class.getName());

    PersistedModelLocalServiceRegistryUtil.register(Dummy.class.getName(), new PersistedModelLocalService() {

        @Override
        public PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException {

            return null;
        }

        @Override
        public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException {

            return null;
        }

    });
}