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

Java Property类代码示例

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

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



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

示例1: getAttributeRangeCriterion

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
protected Criterion getAttributeRangeCriterion(
	Model model, String attribute, Object value, boolean isStartValue) {

	if (!model.hasAttribute(attribute)) {
		return RestrictionsFactoryUtil.disjunction();
	}

	Property property = model.getProperty(attribute);

	if (isStartValue) {
		return property.ge(value);
	}

	return property.lt(value);
}
 
开发者ID:jorgediaz-lr,项目名称:staging-checker,代码行数:16,代码来源:StagingCheckerModelFactory.java


示例2: getAttributeCriterion

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
public <T> Criterion getAttributeCriterion(String attribute, List<T> list) {

	if (!this.hasAttribute(attribute) || Validator.isNull(list)) {
		return null;
	}

	Property property = getProperty(attribute);

	if (list.size() == 1) {
		return property.eq(list.get(0));
	}

	int maxNumClauses = MAX_NUMBER_OF_CLAUSES;

	if (list.size() <= maxNumClauses) {
		return property.in(list);
	}

	Disjunction disjunction = RestrictionsFactoryUtil.disjunction();

	int numberOfDisjuntions =
		((list.size() + maxNumClauses - 1) / maxNumClauses);

	for (int i = 0; i<numberOfDisjuntions; i++) {
		int start = i * maxNumClauses;
		int end = Math.min(start + maxNumClauses, list.size());

		List<T> subList = list.subList(start, end);
		disjunction.add(property.in(subList));
	}

	return disjunction;
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:35,代码来源:ModelImpl.java


示例3: getProperty

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
public Property getProperty(String attribute) {
	attribute = cleanAttributeName(attribute);

	if (isPartOfPrimaryKeyMultiAttribute(attribute)) {
		attribute = "primaryKey." + attribute;
	}

	return PropertyFactoryUtil.forName(attribute);
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:11,代码来源:ModelImpl.java


示例4: addCriteria

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
protected void addCriteria(DynamicQuery dynamicQuery) {
	_portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate");

	StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Artist.class.getName());

	Property workflowStatusProperty = PropertyFactoryUtil.forName("status");

	dynamicQuery.add(workflowStatusProperty.in(
			stagedModelDataHandler.getExportableStatuses()));
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:12,代码来源:ArtistExportActionableDynamicQuery.java


示例5: addCriteria

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
protected void addCriteria(DynamicQuery dynamicQuery) {
	_portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate");

	StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Album.class.getName());

	Property workflowStatusProperty = PropertyFactoryUtil.forName("status");

	dynamicQuery.add(workflowStatusProperty.in(
			stagedModelDataHandler.getExportableStatuses()));
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:12,代码来源:AlbumExportActionableDynamicQuery.java


示例6: addCriteria

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
protected void addCriteria(DynamicQuery dynamicQuery) {
	_portletDataContext.addDateRangeCriteria(dynamicQuery, "modifiedDate");

	StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Song.class.getName());

	Property workflowStatusProperty = PropertyFactoryUtil.forName("status");

	dynamicQuery.add(workflowStatusProperty.in(
			stagedModelDataHandler.getExportableStatuses()));
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:12,代码来源:SongExportActionableDynamicQuery.java


示例7: reindexTaskRecords

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
protected void reindexTaskRecords(long companyId) throws PortalException {

        final IndexableActionableDynamicQuery indexableActionableDynamicQuery = _taskRecordLocalService
                .getIndexableActionableDynamicQuery();

        indexableActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {

            @Override
            public void addCriteria(DynamicQuery dynamicQuery) {

                Property statusProperty = PropertyFactoryUtil.forName("status");

                Integer[] statuses = { WorkflowConstants.STATUS_APPROVED, WorkflowConstants.STATUS_IN_TRASH };

                dynamicQuery.add(statusProperty.in(statuses));
            }

        });
        indexableActionableDynamicQuery.setCompanyId(companyId);
        // TODO: what about the group?
        // indexableActionableDynamicQuery.setGroupId(groupId);
        indexableActionableDynamicQuery
                .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<TaskRecord>() {

                    @Override
                    public void performAction(TaskRecord taskRecord) {
                        try {
                            Document document = getDocument(taskRecord);

                            indexableActionableDynamicQuery.addDocuments(document);
                        } catch (PortalException pe) {
                            if (_log.isWarnEnabled()) {
                                _log.warn("Unable to index taskRecord " + taskRecord.getTaskRecordId(), pe);
                            }
                        }
                    }

                });
        indexableActionableDynamicQuery.setSearchEngineId(getSearchEngineId());

        indexableActionableDynamicQuery.performActions();
    }
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:43,代码来源:TaskRecordIndexer.java


示例8: reindexContacts

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
protected void reindexContacts(long companyId) throws PortalException {

        final IndexableActionableDynamicQuery indexableActionableDynamicQuery = _contactLocalService
                .getIndexableActionableDynamicQuery();

        indexableActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {

            @Override
            public void addCriteria(DynamicQuery dynamicQuery) {

                Property statusProperty = PropertyFactoryUtil.forName("status");

                Integer[] statuses = { WorkflowConstants.STATUS_APPROVED, WorkflowConstants.STATUS_IN_TRASH };

                dynamicQuery.add(statusProperty.in(statuses));
            }

        });
        indexableActionableDynamicQuery.setCompanyId(companyId);
        // TODO: what does setGroupId()?
        // indexableActionableDynamicQuery.setGroupId(groupId);
        indexableActionableDynamicQuery
                .setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Contact>() {

                    @Override
                    public void performAction(Contact contact) {
                        try {
                            Document document = getDocument(contact);

                            indexableActionableDynamicQuery.addDocuments(document);
                        } catch (PortalException pe) {
                            if (_log.isWarnEnabled()) {
                                _log.warn("Unable to index bookmarks contact " + contact.getContactId(), pe);
                            }
                        }
                    }

                });
        indexableActionableDynamicQuery.setSearchEngineId(getSearchEngineId());

        indexableActionableDynamicQuery.performActions();
    }
 
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:43,代码来源:ContactIndexer.java


示例9: reindexMeasurements

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
protected void reindexMeasurements(long companyId) throws PortalException {

        _log.info("reIndexMeasurements()");

        final IndexableActionableDynamicQuery indexableActionableDynamicQuery = _measurementLocalService
                .getIndexableActionableDynamicQuery();

        indexableActionableDynamicQuery.setAddCriteriaMethod(
                new ActionableDynamicQuery.AddCriteriaMethod() {

                    @Override
                    public void addCriteria(DynamicQuery dynamicQuery) {

                        Property statusProperty = PropertyFactoryUtil
                                .forName("status");

                        Integer[] statuses = {
                                WorkflowConstants.STATUS_APPROVED,
                                WorkflowConstants.STATUS_IN_TRASH };

                        dynamicQuery.add(statusProperty.in(statuses));
                    }

                });
        indexableActionableDynamicQuery.setCompanyId(companyId);
        // TODO: what about the group?
        // indexableActionableDynamicQuery.setGroupId(groupId);
        indexableActionableDynamicQuery.setPerformActionMethod(
                new ActionableDynamicQuery.PerformActionMethod<Measurement>() {

                    @Override
                    public void performAction(Measurement measurement) {
                        try {
                            Document document = getDocument(measurement);

                            indexableActionableDynamicQuery
                                    .addDocuments(document);
                        } catch (PortalException pe) {
                            if (_log.isWarnEnabled()) {
                                _log.warn("Unable to index measurement "
                                        + measurement.getMeasurementId(), pe);
                            }
                        }
                    }

                });
        indexableActionableDynamicQuery.setSearchEngineId(getSearchEngineId());

        indexableActionableDynamicQuery.performActions();
    }
 
开发者ID:inofix,项目名称:ch-inofix-data-manager,代码行数:51,代码来源:MeasurementIndexer.java


示例10: getProperty

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
public Property getProperty(String attribute) {
	return model.getProperty(attribute);
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:5,代码来源:ModelWrapper.java


示例11: getExportActionableDynamicQuery

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
	final PortletDataContext portletDataContext) {
	final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
			@Override
			public long performCount() throws PortalException {
				ManifestSummary manifestSummary = portletDataContext.getManifestSummary();

				StagedModelType stagedModelType = getStagedModelType();

				long modelAdditionCount = super.performCount();

				manifestSummary.addModelAdditionCount(stagedModelType.toString(),
					modelAdditionCount);

				long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
						stagedModelType);

				manifestSummary.addModelDeletionCount(stagedModelType.toString(),
					modelDeletionCount);

				return modelAdditionCount;
			}
		};

	initActionableDynamicQuery(exportActionableDynamicQuery);

	exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
			@Override
			public void addCriteria(DynamicQuery dynamicQuery) {
				portletDataContext.addDateRangeCriteria(dynamicQuery,
					"modifiedDate");

				StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Artist.class.getName());

				Property workflowStatusProperty = PropertyFactoryUtil.forName(
						"status");

				dynamicQuery.add(workflowStatusProperty.in(
						stagedModelDataHandler.getExportableStatuses()));
			}
		});

	exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());

	exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());

	exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
			@Override
			public void performAction(Object object)
				throws PortalException {
				Artist stagedModel = (Artist)object;

				StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
					stagedModel);
			}
		});
	exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
			PortalUtil.getClassNameId(Artist.class.getName())));

	return exportActionableDynamicQuery;
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:63,代码来源:ArtistLocalServiceBaseImpl.java


示例12: getExportActionableDynamicQuery

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
	final PortletDataContext portletDataContext) {
	final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
			@Override
			public long performCount() throws PortalException {
				ManifestSummary manifestSummary = portletDataContext.getManifestSummary();

				StagedModelType stagedModelType = getStagedModelType();

				long modelAdditionCount = super.performCount();

				manifestSummary.addModelAdditionCount(stagedModelType.toString(),
					modelAdditionCount);

				long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
						stagedModelType);

				manifestSummary.addModelDeletionCount(stagedModelType.toString(),
					modelDeletionCount);

				return modelAdditionCount;
			}
		};

	initActionableDynamicQuery(exportActionableDynamicQuery);

	exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
			@Override
			public void addCriteria(DynamicQuery dynamicQuery) {
				portletDataContext.addDateRangeCriteria(dynamicQuery,
					"modifiedDate");

				StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Song.class.getName());

				Property workflowStatusProperty = PropertyFactoryUtil.forName(
						"status");

				dynamicQuery.add(workflowStatusProperty.in(
						stagedModelDataHandler.getExportableStatuses()));
			}
		});

	exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());

	exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());

	exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
			@Override
			public void performAction(Object object)
				throws PortalException {
				Song stagedModel = (Song)object;

				StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
					stagedModel);
			}
		});
	exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
			PortalUtil.getClassNameId(Song.class.getName())));

	return exportActionableDynamicQuery;
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:63,代码来源:SongLocalServiceBaseImpl.java


示例13: getExportActionableDynamicQuery

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
@Override
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
	final PortletDataContext portletDataContext) {
	final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
			@Override
			public long performCount() throws PortalException {
				ManifestSummary manifestSummary = portletDataContext.getManifestSummary();

				StagedModelType stagedModelType = getStagedModelType();

				long modelAdditionCount = super.performCount();

				manifestSummary.addModelAdditionCount(stagedModelType.toString(),
					modelAdditionCount);

				long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
						stagedModelType);

				manifestSummary.addModelDeletionCount(stagedModelType.toString(),
					modelDeletionCount);

				return modelAdditionCount;
			}
		};

	initActionableDynamicQuery(exportActionableDynamicQuery);

	exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
			@Override
			public void addCriteria(DynamicQuery dynamicQuery) {
				portletDataContext.addDateRangeCriteria(dynamicQuery,
					"modifiedDate");

				StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(Album.class.getName());

				Property workflowStatusProperty = PropertyFactoryUtil.forName(
						"status");

				dynamicQuery.add(workflowStatusProperty.in(
						stagedModelDataHandler.getExportableStatuses()));
			}
		});

	exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());

	exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());

	exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
			@Override
			public void performAction(Object object)
				throws PortalException {
				Album stagedModel = (Album)object;

				StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
					stagedModel);
			}
		});
	exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
			PortalUtil.getClassNameId(Album.class.getName())));

	return exportActionableDynamicQuery;
}
 
开发者ID:juliocamarero,项目名称:jukebox-portlet,代码行数:63,代码来源:AlbumLocalServiceBaseImpl.java


示例14: getProperty

import com.liferay.portal.kernel.dao.orm.Property; //导入依赖的package包/类
public Property getProperty(String attribute); 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:2,代码来源:Model.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java PositionColorTextureCoordinatesShaderProgram类代码示例发布时间:2022-05-22
下一篇:
Java WebContent类代码示例发布时间: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