• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CounterLocalServiceUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.liferay.counter.service.CounterLocalServiceUtil的典型用法代码示例。如果您正苦于以下问题:Java CounterLocalServiceUtil类的具体用法?Java CounterLocalServiceUtil怎么用?Java CounterLocalServiceUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CounterLocalServiceUtil类属于com.liferay.counter.service包,在下文中一共展示了CounterLocalServiceUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: addRegion

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public Region addRegion(Region region) throws SystemException {
	_log.debug("addRegion");
	long regionId = CounterLocalServiceUtil.increment(Region.class.getName());
	Region model = regionPersistence.create(regionId);
	model.setUserId(region.getUserId());
	model.setCompanyId(region.getCompanyId());
	model.setCreateDate(new Date());
	model.setModifiedDate(new Date());
	model.setAgs(region.getAgs());
	model.setName(region.getName());
	model.setCoordniates_x(region.getCoordniates_x());
	model.setCoordniates_y(region.getCoordniates_y());
	model.setParentRegion(region.getParentRegion());
	return regionPersistence.update(model, true);
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:17,代码来源:RegionLocalServiceImpl.java


示例2: createRelatedApplications

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public RelatedApplications createRelatedApplications(long appId1, long appId2) {		
	long newRelatedApplicationsId;
	RelatedApplications _relatedApplications = null;
	try {
		if (! alreadyAreRelated(appId1, appId2)) {
			newRelatedApplicationsId = CounterLocalServiceUtil.increment(RelatedApplications.class.getName());
			_relatedApplications =  relatedApplicationsPersistence.create(newRelatedApplicationsId);
			_relatedApplications.setApplicationId(appId1);
			_relatedApplications.setApplicationId2(appId2);			
			relatedApplicationsPersistence.update(_relatedApplications, true);
		}
	} catch (SystemException e) {
		e.printStackTrace();
	}
	return _relatedApplications;
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:17,代码来源:RelatedApplicationsLocalServiceImpl.java


示例3: addMultiMedia

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public MultiMedia addMultiMedia(MultiMedia multiMedia) throws SystemException {
	try {
		_log.debug(multiMedia.getUserId());
		_log.debug(multiMedia.getImageId());

		long multiMediaId = CounterLocalServiceUtil.increment(MultiMedia.class.getName());
		MultiMedia model =  multiMediaPersistence.create(multiMediaId);
		model.setUserId(multiMedia.getUserId());
		model.setCompanyId(multiMedia.getCompanyId());
		model.setCreateDate(new Date());
		model.setModifiedDate(new Date());
		model.setApplicationId(multiMedia.getApplicationId());
		model.setName(multiMedia.getName());
		model.setType(multiMedia.getType());
		model.setImageId(multiMedia.getImageId());
		return multiMediaPersistence.update(model, true);
	} catch (Exception e) {
		_log.info(e.toString());
	}
	return null;
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:22,代码来源:MultiMediaLocalServiceImpl.java


示例4: addActivityTriesDeleted

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public ActivityTriesDeleted addActivityTriesDeleted(long groupId, long actId, long userId){
	ActivityTriesDeleted activityTriesDeleted = null;
	
	try {
		activityTriesDeleted = ActivityTriesDeletedUtil.create(CounterLocalServiceUtil.increment(ActivityTriesDeleted.class.getName()));
		activityTriesDeleted.setActId(actId);
		activityTriesDeleted.setGroupId(groupId);
		activityTriesDeleted.setStatus(LmsConstant.STATUS_NOT_STARTED);
		activityTriesDeleted.setStartDate(new Date());
		activityTriesDeleted.setUserId(userId);
		ActivityTriesDeletedLocalServiceUtil.addActivityTriesDeleted(activityTriesDeleted);
	} catch (SystemException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	return activityTriesDeleted;
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:19,代码来源:ActivityTriesDeletedLocalServiceImpl.java


示例5: addCheckP2pMailing

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public CheckP2pMailing addCheckP2pMailing(CheckP2pMailing newCheckP2pMail)
		throws SystemException {
	try{
		
		long CheckP2pMailingId = CounterLocalServiceUtil.increment(CheckP2pMailing.class.getName());
		
		CheckP2pMailing fileobj = checkP2pMailingPersistence.create(CheckP2pMailingId);
		
		fileobj.setActId(newCheckP2pMail.getActId());
		fileobj.setDate(new java.util.Date(System.currentTimeMillis()));

		return checkP2pMailingPersistence.update(fileobj, false);
		
	}
	catch(Exception e){
		if (_log.isErrorEnabled()) { 
			_log.error("Error getting CheckP2pMailingLocalService.addCheckP2pMailing");
			_log.error(e.getMessage());
		}
		return null;
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:24,代码来源:CheckP2pMailingLocalServiceImpl.java


示例6: addRegion

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public AHRegion addRegion(final String city, final String country,
        final String zip) {
	AHRegion result = null;

	result = this.getRegion(city, country, zip);
	if (result == null) {
		try {
			result = this.createAHRegion(new AHRegionPK(
			        CounterLocalServiceUtil.increment(AHRegion.class
			                .getName()), zip, city, country));
			result = this.updateAHRegion(result);
		} catch (final SystemException e) {
			m_objLog.error(e);
		}
	}

	return result;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:20,代码来源:AHRegionLocalServiceImpl.java


示例7: addCategoryEntry

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public AHCatEntries addCategoryEntry(long catId, final String name,
        final String description, long parentId) {
	AHCatEntries result = null;

	
	if (name != null && catId >= 0) {
		try {
			result = this.createAHCatEntries(CounterLocalServiceUtil
			        .increment(AHCatEntries.class.getName()));
			result.setName(name);
			result.setDescr(description);
			result.setCatId(catId);
			result.setParentId(parentId);
			result = this.updateAHCatEntries(result);

			m_objLog.info("Added category item " + result.getName()
			        + " in category " + catId + " with parent "
			        + parentId);
		} catch (final SystemException e) {
			m_objLog.error(e);
		}
	}

	return result;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:27,代码来源:AHCatEntriesLocalServiceImpl.java


示例8: addCategory

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public AHCategories addCategory(final String name,
        final String description, int type)
        throws SystemException {

	m_objLog.debug("addCategory::start("+name+")");
	AHCategories result = this.getCategory(name, type);
	if (result == null) {
		result = this.createAHCategories(CounterLocalServiceUtil
		        .increment(AHCategories.class.getName()));
		result.setName(name);
		result.setType(type);
		result.setDescr(description);
		result = this.updateAHCategories(result);
	}
	m_objLog.debug("addCategory::end("+name+")");

	return result;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:20,代码来源:AHCategoriesLocalServiceImpl.java


示例9: addContact

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public AHContact addContact(final String forename, final String surname,
        final String phone, final String fax, final String mail,
        final String web) {
	AHContact result = null;
	try {
		result = this.createAHContact(CounterLocalServiceUtil
		        .increment(AHContact.class.getName()));
		result.setEmail(mail);
		result.setFax(fax);
		result.setForename(forename);
		result.setSurname(surname);
		result.setMobile(phone);
		result.setTel(phone);
		result.setWww(web);
		this.updateAHContact(result);
	} catch (final SystemException e) {
		m_objLog.error(e);
	}

	return result;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:23,代码来源:AHContactLocalServiceImpl.java


示例10: criarEnderecoParaUsuario

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
private Address criarEnderecoParaUsuario(Long companyId, User usuario) throws SystemException {

		Address address = AddressUtil.create(CounterLocalServiceUtil.increment(Address.class.getName()));

		address.setCompanyId(companyId);
		address.setCity("-");
		address.setStreet1("-");
		address.setZip("-");
		address.setPrimary(true);
		address.setMailing(false);
		address.setCountryId(48);
		address.setRegionId(uf);
		address.setUserId(usuario.getUserId());
		address.setUserName(usuario.getFullName());
		address.setCreateDate(new Date());
		address.setModifiedDate(new Date());
		address.setTypeId(11000);

		// Relacionamento com o contato
		address.setClassPK(usuario.getContactId());
		address.setClassNameId(PortalUtil.getClassNameId(Contact.class.getName()));

		return AddressLocalServiceUtil.addAddress(address);
	}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:25,代码来源:CadastroBean.java


示例11: saveChatRoomVideo

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
private ChatRoomVideo saveChatRoomVideo(ChatRoomVideo video) {
	try {
		if (video.getVideoId() == 0) {
			if (video.isVideoEnabled()) {
				long videoId = CounterLocalServiceUtil.increment(ChatRoomVideo.class.getName());
				ChatRoomVideo chatRoomVideo = ChatRoomVideoLocalServiceUtil.createChatRoomVideo(videoId);
				chatRoomVideo.setVideoDescription(video.getVideoDescription());
				chatRoomVideo.setVideoEnabled(video.isVideoEnabled());
				chatRoomVideo.setVideoSubtitle(video.getVideoSubtitle());
				chatRoomVideo.setVideoTitle(video.getVideoTitle());
				chatRoomVideo.setVideoType(video.getVideoType());
				chatRoomVideo.setVideoUrl(video.getVideoUrl());
				return ChatRoomVideoLocalServiceUtil.addChatRoomVideo(chatRoomVideo);
			} else {
				return null;
			}

		} else {
			return ChatRoomVideoLocalServiceUtil.updateChatRoomVideo(video, true);
		}
	} catch (SystemException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:25,代码来源:ChatRoomEditBean.java


示例12: processFilter

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
protected void processFilter(javax.servlet.http.HttpServletRequest request,
		javax.servlet.http.HttpServletResponse response,
		FilterChain filterChain) throws Exception {

	// add object with Liferay Demo Service and show current object list
	// size
	MimacomDemoObject object = MimacomDemoObjectLocalServiceUtil
			.createMimacomDemoObject(CounterLocalServiceUtil
					.increment(MimacomDemoObject.class.getName()));
	MimacomDemoObjectLocalServiceUtil.addMimacomDemoObject(object);
	_log.info("Found objects : ..."
			+ MimacomDemoObjectLocalServiceUtil.getMimacomDemoObjects(-1,
					-1).size());

	processFilter(DemoServletFilter.class, request, response, filterChain);

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:19,代码来源:DemoServletFilter.java


示例13: createMicroSite

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public static void createMicroSite(ActionRequest request) throws Exception{
    
    ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
    
    String cmd = ParamUtil.getString(request, Constants.CMD);
    
    try {
        if (cmd.equals(Constants.ADD)) {
            Group group = updateGroup(request);
            long microSiteId = CounterLocalServiceUtil.increment(MicroSite.class.getName());
            MicroSite microSite = MicroSiteLocalServiceUtil.createMicroSite(microSiteId);
            microSite.setCompanyId(themeDisplay.getCompanyId());
            microSite.setUserId(themeDisplay.getUserId());
            microSite.setUserName(themeDisplay.getUser().getScreenName());
            microSite.setCreateDate(new Date());
            microSite.setModifiedDate(new Date());
            microSite.setGroupId(group.getGroupId());
            MicroSiteLocalServiceUtil.updateMicroSite(microSite);
        }
    }
    catch (Exception e) {
        SessionErrors.add(request, e.getClass());
        throw e;
    }
}
 
开发者ID:rivetlogic,项目名称:liferay-microsite-manager,代码行数:26,代码来源:MicroSiteUtil.java


示例14: addShortUrl

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public ShortUrl addShortUrl(ShortUrl newShortUrl) throws SystemException {
	long shortUrlId = CounterLocalServiceUtil.increment(ShortUrl.class.getName());
	
	ShortUrl shortUrl = shortUrlPersistence.create(shortUrlId);
	shortUrl.setIdentifier(newShortUrl.getIdentifier());
	shortUrl.setOriginalUrl(newShortUrl.getOriginalUrl());
	shortUrl.setCompanyId(newShortUrl.getCompanyId());
	shortUrl.setGroupId(newShortUrl.getGroupId());
	shortUrl.setUserId(newShortUrl.getUserId());
	
	Date now = new Date();
	shortUrl.setCreateDate(now);
	shortUrl.setModifiedDate(now);

	shortUrlPersistence.update(shortUrl);

	try {
		resourceLocalService.addResources(shortUrl.getCompanyId(), shortUrl.getGroupId(), shortUrl.getUserId(), ShortUrl.class.getName(), shortUrlId, false, true, true);
	} catch (PortalException e) {
		log.error(e);
	}

	return shortUrl;
}
 
开发者ID:moddavid,项目名称:Ancud_ShortURL-portlet,代码行数:25,代码来源:ShortUrlLocalServiceImpl.java


示例15: init

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public void init()
	throws PortletException {

	try {
		AdminIPConfiguration config = AdminIPConfigurationLocalServiceUtil.getAdminIPConfiguration();
		if (config == null) {
			long configId = CounterLocalServiceUtil.increment(AdminIPConfiguration.class.getName());
			config = AdminIPConfigurationLocalServiceUtil.createAdminIPConfiguration(configId);
			config.setDebug(false);
			config.setMode(MODE_BOTH);
			config.setRedirectUrl(defaultRedirectUrl);
			AdminIPConfigurationLocalServiceUtil.addAdminIPConfiguration(config);
		}
	}
	catch (SystemException e) {
		logger.error(e.getMessage(), e);
	}
	
	super.init();
}
 
开发者ID:technopolis,项目名称:role-access-lists,代码行数:22,代码来源:AdminAllowedIPsPortlet.java


示例16: addEntitlement

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public Entitlement addEntitlement(long userId, long companyId, String entitlementName, String explanation) throws SystemException {
	long entitlementId = CounterLocalServiceUtil.increment(Entitlement.class.getName());
	_log.debug("addEntitlement: " + entitlementId);
	
	Entitlement model =  entitlementPersistence.create(entitlementId);
			
	model.setEntitlementName(entitlementName);
	model.setExplanation(explanation);
	model.setUserId(userId);
	model.setCompanyId(companyId);
	model.setCreateDate(new Date());
	
	return entitlementPersistence.update(model, true);		
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:15,代码来源:EntitlementLocalServiceImpl.java


示例17: addApplication_Entitlement

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
@Override
public Application_Entitlement addApplication_Entitlement(Application_Entitlement application_Entitlement) throws SystemException {
	long application_EntitlementID = CounterLocalServiceUtil.increment(Application_Entitlement.class.getName());
	_log.debug("addApplication_Entitlement:application_EntitlementID: " + application_EntitlementID);
	Application_Entitlement model =  application_EntitlementPersistence.create(application_EntitlementID);
	model.setApplicationId(application_Entitlement.getApplicationId());
	model.setEntitlementId(application_Entitlement.getEntitlementId());
	model.setName(application_Entitlement.getName());
	model.setMotivation(application_Entitlement.getMotivation());
	model.setCompanyId(application_Entitlement.getCompanyId());
	model.setCreateDate(new Date());
	model.setModifiedDate(new Date());
	model.setUserId(application_Entitlement.getUserId());		
	return application_EntitlementPersistence.update(model, true);
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:16,代码来源:Application_EntitlementLocalServiceImpl.java


示例18: addLegalDetails

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public LegalDetails addLegalDetails(LegalDetails legalDetails) throws SystemException {
	_log.debug("addLegalDetails");
	long legalDetailsId = CounterLocalServiceUtil.increment(LegalDetails.class.getName());
	LegalDetails model =  legalDetailsPersistence.create(legalDetailsId);
	model.setAddress(legalDetails.getAddress());
	model.setEmail(legalDetails.getEmail());
	model.setUserId(legalDetails.getUserId());
	model.setCompanyId(legalDetails.getCompanyId());
	model.setCreateDate(new Date());
	model.setFax(legalDetails.getFax());
	model.setTelephone(legalDetails.getTelephone());
	model.setURL(legalDetails.getURL());
	model.setValueAddedTaxNo(legalDetails.getValueAddedTaxNo());
	return legalDetailsPersistence.update(model, true);		
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:16,代码来源:LegalDetailsLocalServiceImpl.java


示例19: addLink

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public Link addLink(Link link) throws SystemException {
	_log.debug("addLink");
	long linkId = CounterLocalServiceUtil.increment(Link.class.getName());
	Link model =  linkPersistence.create(linkId);
	model.setUserId(link.getUserId());
	model.setCompanyId(link.getCompanyId());
	model.setCreateDate(new Date());
	model.setModifiedDate(new Date());
	model.setApplicationId(link.getApplicationId());
	model.setDisplayName(link.getDisplayName());
	model.setType(link.getType());
	model.setUrl(link.getUrl());
	return linkPersistence.update(model, true);		
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:15,代码来源:LinkLocalServiceImpl.java


示例20: addCategory

import com.liferay.counter.service.CounterLocalServiceUtil; //导入依赖的package包/类
public Category addCategory(long userId, long companyId, String categoryName, long parentCategory) throws SystemException {
	long categoryId = CounterLocalServiceUtil.increment(Category.class.getName());
	_log.debug("addCategory: " + categoryId);
	
	Category category =  categoryPersistence.create(categoryId);
			
	category.setCategoryName(categoryName);
	category.setParentCategory(parentCategory);
	category.setUserId(userId);
	category.setCompanyId(companyId);
	category.setCreateDate(new Date());
	category.setModifiedDate((new Date()));		
	return categoryPersistence.update(category, true);		
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:15,代码来源:CategoryLocalServiceImpl.java



注:本文中的com.liferay.counter.service.CounterLocalServiceUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EntitySpawnPlacementRegistry类代码示例发布时间:2022-05-22
下一篇:
Java GetDiagnosticsResponsePBImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap