当前位置: 首页>>代码示例>>Java>>正文


Java Document.addNumberSortable方法代码示例

本文整理汇总了Java中com.liferay.portal.kernel.search.Document.addNumberSortable方法的典型用法代码示例。如果您正苦于以下问题:Java Document.addNumberSortable方法的具体用法?Java Document.addNumberSortable怎么用?Java Document.addNumberSortable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.liferay.portal.kernel.search.Document的用法示例。


在下文中一共展示了Document.addNumberSortable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(TaskRecord taskRecord) throws Exception {

    Document document = getBaseModelDocument(CLASS_NAME, taskRecord);

    document.addDateSortable(Field.CREATE_DATE, taskRecord.getCreateDate());
    document.addTextSortable("description", taskRecord.getDescription());
    document.addNumberSortable("duration", taskRecord.getDuration());
    document.addDateSortable("fromDate", taskRecord.getFromDate());
    document.addNumberSortable("taskRecordId", taskRecord.getTaskRecordId());
    document.addNumberSortable(Field.STATUS, taskRecord.getStatus());
    document.addTextSortable("ticketURL", taskRecord.getTicketURL());
    document.addKeyword("ownerUserId", taskRecord.getUserId());
    document.addDateSortable("modifiedDate", taskRecord.getModifiedDate());
    document.addDateSortable("untilDate", taskRecord.getUntilDate());
    document.addTextSortable("userName", taskRecord.getUserName());
    document.addTextSortable("workPackage", taskRecord.getWorkPackage());

    return document;

}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:22,代码来源:TaskRecordIndexer.java

示例2: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(WorkingUnit workingUnit) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, workingUnit);

	document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(workingUnit.getCompanyId()));
	document.addDateSortable(Field.MODIFIED_DATE, workingUnit.getModifiedDate());
	document.addKeywordSortable(Field.USER_ID, String.valueOf(workingUnit.getUserId()));
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(workingUnit.getUserName()));

	document.addNumberSortable(WorkingUnitTerm.GROUP_ID, workingUnit.getGroupId());
	document.addNumberSortable(WorkingUnitTerm.WORKINGUNIT_ID, workingUnit.getWorkingUnitId());
	document.addTextSortable(WorkingUnitTerm.NAME, workingUnit.getName());
	document.addTextSortable(WorkingUnitTerm.ENNAME, workingUnit.getEnName());
	document.addTextSortable(WorkingUnitTerm.GOV_AGENCY_CODE, workingUnit.getGovAgencyCode());
	document.addNumberSortable(WorkingUnitTerm.PARENT_WORKING_UNIT_ID, workingUnit.getParentWorkingUnitId());
	document.addTextSortable(WorkingUnitTerm.SIBLING, workingUnit.getSibling());
	document.addTextSortable(WorkingUnitTerm.TREEINDEX, workingUnit.getTreeIndex());
	document.addTextSortable(WorkingUnitTerm.ADDRESS, workingUnit.getAddress());
	document.addTextSortable(WorkingUnitTerm.TEL_NO, workingUnit.getTelNo());
	document.addTextSortable(WorkingUnitTerm.FAX_NO, workingUnit.getFaxNo());
	document.addTextSortable(WorkingUnitTerm.EMAIL, workingUnit.getEmail());
	document.addTextSortable(WorkingUnitTerm.WEBSITE, workingUnit.getWebsite());
	document.addNumberSortable(WorkingUnitTerm.LOGO_FILE_ENTRY_ID, workingUnit.getLogoFileEntryId());
	
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:27,代码来源:WorkingUnitIndexer.java

示例3: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(JobPos jobPos) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, jobPos);

	document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(jobPos.getCompanyId()));
	document.addDateSortable(Field.MODIFIED_DATE, jobPos.getModifiedDate());
	document.addKeywordSortable(Field.USER_ID, String.valueOf(jobPos.getUserId()));
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(jobPos.getUserName()));
	
	document.addNumberSortable(JobPosTerm.GROUP_ID, jobPos.getGroupId());
	document.addNumberSortable(JobPosTerm.JOBPOS_ID, jobPos.getJobPosId());
	document.addTextSortable(JobPosTerm.TITLE, jobPos.getTitle());
	document.addTextSortable(JobPosTerm.DESCRIPTION, jobPos.getDescription());
	document.addNumberSortable(JobPosTerm.MAPPING_ROLE_ID, jobPos.getMappingRoleId());
	document.addNumberSortable(JobPosTerm.LEADER, jobPos.getLeader());
	
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:19,代码来源:JobPosIndexer.java

示例4: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
	protected Document doGetDocument(RegistrationLog object) throws Exception {
		Document document = getBaseModelDocument(CLASS_NAME, object);

		// Indexer of audit fields
//		document.addNumberSortable(Field.REGISTRATIONLOG_ID, object.getRegistrationLogId());
		document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
		document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
		document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
		document.addNumberSortable(Field.USER_ID, object.getUserId());
//		document.addKeywordSortable(Field.USER_NAME, String.valueOf(object.getUserName()));
		document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
		document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

		// add number fields

		document.addNumberSortable(RegistrationLogTerm.REGISTRATION_ID, object.getRegistrationId());

		// add text fields

		document.addTextSortable(RegistrationLogTerm.AUTHOR, object.getAuthor());
		document.addTextSortable(RegistrationLogTerm.CONTENT, object.getContent());
		document.addTextSortable(RegistrationLogTerm.PAYLOAD, object.getPayload());
		
		return document;
	}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:27,代码来源:RegistrationLogIndexer.java

示例5: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(WorkTime workTime) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, workTime);

	document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(workTime.getCompanyId()));
	document.addDateSortable(Field.MODIFIED_DATE, workTime.getModifiedDate());
	document.addKeywordSortable(Field.USER_ID, String.valueOf(workTime.getUserId()));
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(workTime.getUserName()));

	document.addNumberSortable(WorkTimeTerm.WORKTIME_ID, workTime.getWorkTimeId());
	document.addNumberSortable(WorkTimeTerm.DAY, workTime.getDay());
	
	document.addNumberSortable(WorkTimeTerm.GROUP_ID, workTime.getGroupId());
	document.addTextSortable(WorkTimeTerm.HOURS, workTime.getHours());
	
	document.setSortableTextFields(
			new String[] { WorkTimeTerm.CREATE_DATE });

	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:21,代码来源:WorkTimeIndexer.java

示例6: getUserProfile

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
public Document getUserProfile(long id, long groupId, ServiceContext serviceContext) {
	Employee employee = EmployeeLocalServiceUtil.fetchByF_mappingUserId(groupId, id);
	//TODO
	// PARTER INFO
	Document document = new DocumentImpl();
	
	User user = UserLocalServiceUtil.fetchUser(employee.getMappingUserId());
	
	String screenName = StringPool.BLANK;
	String email = StringPool.BLANK;
	
	if(Validator.isNotNull(user)){
		
		screenName = user.getScreenName();
		email = user.getEmailAddress();
		
	}
	
	document.addTextSortable("className", Employee.class.getName());
	document.addTextSortable("classPK", String.valueOf(employee.getEmployeeId()));
	
	document.addTextSortable("screenName", screenName);
	document.addTextSortable("email", email);
	document.addTextSortable("fullName", employee.getFullName());
	
	document.addTextSortable("contactEmail", employee.getEmail());
	document.addTextSortable("contactTelNo", employee.getTelNo());
	document.addNumberSortable("gender", employee.getGender());
	document.addDateSortable("birthdate", employee.getBirthdate());
	
	return document;
	
	
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:36,代码来源:UserActions.java

示例7: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DossierAction object) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(object.getUserName()));
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	// add number fields
	document.addDateSortable(DossierActionTerm.DUE_DATE, object.getDueDate());

	// add number fields
	document.addNumberSortable(DossierActionTerm.DOSSIER_ID, object.getDossierId());
	document.addNumberSortable(DossierActionTerm.SERVICE_PROCESS_ID, object.getServiceProcessId());
	document.addNumberSortable(DossierActionTerm.PREVIOUS_ACTION_ID, object.getPreviousActionId());
	document.addNumberSortable(DossierActionTerm.ACTION_OVER_DUE, object.getActionOverdue());
	document.addNumberSortable(DossierActionTerm.NEXT_ACTION_ID, object.getNextActionId());

	// add text fields
	document.addTextSortable(DossierActionTerm.ACTION_CODE, object.getActionCode());
	document.addTextSortable(DossierActionTerm.ACTION_NAME, object.getActionName());
	document.addTextSortable(DossierActionTerm.ACTION_USER, object.getActionUser());
	document.addTextSortable(DossierActionTerm.ACTION_NOTE, object.getActionNote());
	document.addTextSortable(DossierActionTerm.SYNC_ACTION_CODE, object.getSyncActionCode());
	document.addTextSortable(DossierActionTerm.PENDING, Boolean.toString(object.getPending()));
	document.addTextSortable(DossierActionTerm.ROLLBACK_ABLE, Boolean.toString(object.getRollbackable()));
	document.addTextSortable(DossierActionTerm.STEP_CODE, object.getStepCode());
	document.addTextSortable(DossierActionTerm.STEP_NAME, object.getStepName());
	document.addTextSortable(DossierActionTerm.STEP_INSTRUCTION, object.getStepInstruction());
	document.addTextSortable(DossierActionTerm.PAYLOAD, object.getPayload());

	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:40,代码来源:DossierActionIndexer.java

示例8: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(PaymentConfig object) throws Exception {
	
	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(object.getUserName()));
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	// add text fields
	document.addTextSortable(PaymentConfigTerm.GOV_AGENCY_CODE, object.getGovAgencyCode());
	document.addTextSortable(PaymentConfigTerm.GOV_AGENCY_NAME, object.getGovAgencyName());
	document.addTextSortable(PaymentConfigTerm.GOV_AGENCY_TAX_NO, object.getGovAgencyTaxNo());
	document.addTextSortable(PaymentConfigTerm.INVOICE_TEMPLATE_NO, object.getInvoiceTemplateNo());
	document.addTextSortable(PaymentConfigTerm.INVOICE_ISSUE_NO, object.getInvoiceIssueNo());
	document.addTextSortable(PaymentConfigTerm.INVOICE_LAST_NO, object.getInvoiceLastNo());
	document.addTextSortable(PaymentConfigTerm.INVOICE_FORM, object.getInvoiceForm());
	document.addTextSortable(PaymentConfigTerm.BANK_INFO, object.getBankInfo());
	document.addTextSortable(PaymentConfigTerm.EPAYMENT_CONFIG, object.getEpaymentConfig());
	
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:29,代码来源:PaymentConfigIndexer.java

示例9: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(JobPosWork jobPosWork) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, jobPosWork);

	document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(jobPosWork.getCompanyId()));
	document.addDateSortable(Field.MODIFIED_DATE, jobPosWork.getModifiedDate());
	document.addKeywordSortable(Field.USER_ID, String.valueOf(jobPosWork.getUserId()));
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(jobPosWork.getUserName()));
	
	document.addNumberSortable(JobPosWorkTerm.GROUP_ID, jobPosWork.getGroupId());
	document.addNumberSortable(JobPosWorkTerm.JOBPOS_ID, jobPosWork.getJobPostId());
	document.addTextSortable(JobPosWorkTerm.CHECKLIST_CAT, jobPosWork.getChecklistCat());
	
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:16,代码来源:JobPosWorkIndexer.java

示例10: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(Registration object) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	document.addNumberSortable(RegistrationTerm.REGISTRATION_ID, object.getRegistrationId());
	document.addKeywordSortable(RegistrationTerm.APPLICATION_NAME, object.getApplicantName());
	document.addKeywordSortable(RegistrationTerm.APPLICATION_ID_TYPE, object.getApplicantIdType());
	document.addKeywordSortable(RegistrationTerm.APPLICATION_ID_NO, object.getApplicantIdNo());
	if (null != object.getApplicantIdDate()) {
		document.addDateSortable(RegistrationTerm.APPLICATION_ID_DATE, object.getApplicantIdDate());
	}
	document.addKeywordSortable(RegistrationTerm.ADDRESS, object.getAddress());
	document.addKeywordSortable(RegistrationTerm.CITY_CODE, object.getCityCode());
	document.addKeywordSortable(RegistrationTerm.CITY_NAME, object.getCityName());
	document.addKeywordSortable(RegistrationTerm.DISTRICT_CODE, object.getDistrictCode());
	document.addKeywordSortable(RegistrationTerm.DISTRICT_NAME, object.getDistrictName());
	document.addKeywordSortable(RegistrationTerm.WARD_CODE, object.getWardCode());
	document.addKeywordSortable(RegistrationTerm.WARD_NAME, object.getWardName());
	document.addKeywordSortable(RegistrationTerm.CONTACT_NAME, object.getContactName());
	document.addKeywordSortable(RegistrationTerm.CONTACT_TEL_NO, object.getContactTelNo());
	document.addKeywordSortable(RegistrationTerm.CONTACT_EMAIL, object.getContactEmail());
	document.addKeywordSortable(RegistrationTerm.GOV_AGENCY_CODE, object.getGovAgencyCode());
	document.addKeywordSortable(RegistrationTerm.GOV_AGENCY_NAME, object.getGovAgencyName());
	document.addKeywordSortable(RegistrationTerm.REGISTRATION_CLASS, object.getRegistrationClass());
	document.addNumberSortable(RegistrationTerm.REGISTRATIONSTATE, object.getRegistrationState());
	document.addKeywordSortable(RegistrationTerm.SUBMITTING, Boolean.toString(object.getSubmitting()));

	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:RegistrationIndexer.java

示例11: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DossierFile object) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(object.getUserName()));
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	// add number fields
	
	document.addNumberSortable(DossierFileTerm.DOSSIER_ID, object.getDossierId());
	document.addNumberSortable(DossierFileTerm.DOSSIER_FILE_ID, object.getDossierFileId());
	document.addNumberSortable(DossierFileTerm.FILE_ENTRY_ID, object.getFileEntryId());
	document.addNumberSortable(DossierFileTerm.DOSSIER_PART_TYPE, object.getDossierPartType());
	document.addNumberSortable(DossierFileTerm.SIGN_CHECK, object.getSignCheck());

	// add text fields
	document.addTextSortable(DossierFileTerm.REFERENCE_UID, object.getReferenceUid());
	document.addTextSortable(DossierFileTerm.DOSSIER_TEMPLATE_NO, object.getDossierTemplateNo());
	document.addTextSortable(DossierFileTerm.DOSSIER_PART_NO, object.getDossierPartNo());
	document.addTextSortable(DossierFileTerm.FILE_TEMPLATE_NO, object.getFileTemplateNo());
	document.addTextSortable(DossierFileTerm.DISPLAY_NAME, object.getDisplayName());
	document.addTextSortable(DossierFileTerm.FORM_DATA, object.getFormData());
	document.addTextSortable(DossierFileTerm.ORIGINAL, Boolean.toString(object.getOriginal()));
	document.addTextSortable(DossierFileTerm.E_FORM, Boolean.toString(object.getEForm()));
	document.addTextSortable(DossierFileTerm.IS_NEW, Boolean.toString(object.getIsNew()));
	document.addTextSortable(DossierFileTerm.REMOVED, Boolean.toString(object.getRemoved()));
	document.addTextSortable(DossierFileTerm.SIGN_INFO, object.getSignInfo());
	document.addTextSortable(DossierFileTerm.FORM_SCRIPT, object.getFormScript());
	document.addTextSortable(DossierFileTerm.FORM_REPORT, object.getFormReport());

	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:40,代码来源:DossierFileIndexer.java

示例12: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(RegistrationForm object) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	// add number fields

	document.addNumberSortable(RegistrationFormTerm.REGISTRATION_ID, object.getRegistrationId());

	// add text fields
	document.addTextSortable(RegistrationFormTerm.REFERENCE_UID, object.getReferenceUid());
	document.addTextSortable(RegistrationFormTerm.FORM_NO, object.getFormNo());
	document.addTextSortable(RegistrationFormTerm.FORM_NAME, object.getFormName());
	document.addTextSortable(RegistrationFormTerm.ISNEW, String.valueOf(object.isIsNew()));
	document.addTextSortable(RegistrationFormTerm.REMOVED, String.valueOf(object.isRemoved()));
	document.addTextSortable(RegistrationFormTerm.FORM_NO, String.valueOf(object.getFormNo()).toLowerCase());
	document.addText(RegistrationFormTerm.FORM_DATA, object.getFormData());
	// index formData
       try {
           JSONObject jsonObject =
               JSONFactoryUtil.createJSONObject(object.getFormData());
           
           List<Object[]> keyValues = new ArrayList<Object[]>();
           
           parseJSONObject(keyValues, jsonObject);
           
           if (keyValues != null) {
               for (Object[] keyValue : keyValues) {
                   _log.info("=========REGISTRATION_FORM_INDEX_FORM_DATA========:" + keyValue[0] + "_" + keyValue[1]);
                   document.addKeyword(
                       keyValue[0].toString(), keyValue[1].toString());
               }
           }
       }
       catch (Exception e) {
           _log.error(e);
       }

	
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:50,代码来源:RegistrationFormIndexer.java

示例13: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(ProcessStep object) throws Exception {

	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(object.getUserName()));
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	// add number fields
	document.addNumberSortable(ProcessStepTerm.DURATION_COUNT, object.getDurationCount());
	document.addNumberSortable(ProcessStepTerm.SERVICE_PROCESS_ID, object.getServiceProcessId());

	// add text fields
	document.addTextSortable(ProcessStepTerm.STEP_CODE, object.getStepCode());
	document.addTextSortable(ProcessStepTerm.STEP_NAME, object.getStepName());
	document.addTextSortable(ProcessStepTerm.SEQUENCE_NO, object.getSequenceNo());
	document.addTextSortable(ProcessStepTerm.DOSSIER_STATUS, object.getDossierStatus());

	document.addTextSortable(ProcessStepTerm.DOSSIER_STATUS_TEXT,
			getDictItemName(object.getGroupId(), DOSSIER_STATUS, object.getDossierStatus()));
	document.addTextSortable(ProcessStepTerm.DOSSIER_SUB_STATUS, object.getDossierSubStatus());
	document.addTextSortable(ProcessStepTerm.DOSSIER_SUB_STATUS_TEXT,
			getDictItemName(object.getGroupId(), DOSSIER_STATUS, object.getDossierSubStatus()));
	document.addTextSortable(ProcessStepTerm.CUSTOM_PROCESS_URL, object.getCustomProcessUrl());
	document.addTextSortable(ProcessStepTerm.STEP_INSTRUCTION, object.getStepInstruction());
	document.addTextSortable(ProcessStepTerm.BRIEF_NOTE, object.getBriefNote());
	document.addTextSortable(ProcessStepTerm.EDITABLE, Boolean.toString(object.getEditable()));

	// add extra fields (ProcessStepRole)
	List<ProcessStepRole> roles = ProcessStepRoleLocalServiceUtil.findByP_S_ID(object.getPrimaryKey());

	long[] roleArray = ListUtil.toLongArray(roles, ProcessStepRole.ROLE_ID_ACCESSOR);

	document.addNumber(ProcessStepRoleTerm.ROLE_ID, roleArray);

	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:45,代码来源:ProcessStepIndexer.java

示例14: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(Notificationtemplate notificationtemplates) throws Exception {

	Document document = getBaseModelDocument(CLASS_NAME, notificationtemplates);

	document.addNumberSortable(NotificationTemplateTerm.GROUP_ID, notificationtemplates.getGroupId());
	document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(notificationtemplates.getCompanyId()));
	document.addDateSortable(Field.MODIFIED_DATE, notificationtemplates.getModifiedDate());
	document.addKeywordSortable(Field.USER_ID, String.valueOf(notificationtemplates.getUserId()));
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(notificationtemplates.getUserName()));

	document.addTextSortable(NotificationTemplateTerm.SEND_EMAIL,
			String.valueOf(notificationtemplates.getSendEmail()));
	document.addTextSortable(NotificationTemplateTerm.NOTIFICATTION_TYPE,
			notificationtemplates.getNotificationType());
	document.addNumberSortable(NotificationTemplateTerm.GROUP_ID, notificationtemplates.getGroupId());
	document.addNumberSortable(NotificationTemplateTerm.USER_ID, notificationtemplates.getUserId());
	document.addNumberSortable(NotificationTemplateTerm.COMPANY_ID, notificationtemplates.getCompanyId());
	document.addNumberSortable(NotificationTemplateTerm.NOTIFICATIONTEMPLATE_ID,
			notificationtemplates.getNotificationTemplateId());

	document.addTextSortable(NotificationTemplateTerm.NOTIFICATION_EMAIL_SUBJECT,
			notificationtemplates.getEmailSubject());
	document.addTextSortable(NotificationTemplateTerm.NOTIFICATION_EMAIL_BODY,
			notificationtemplates.getEmailBody());
	document.addTextSortable(NotificationTemplateTerm.NOTIFICATION_TEXT_MESSAGE,
			notificationtemplates.getTextMessage());
	document.addTextSortable(NotificationTemplateTerm.NOTIFICATION_SEND_SMS,
			String.valueOf(notificationtemplates.getSendSMS()));

	document.addNumberSortable(NotificationTemplateTerm.EXPIRE_DURATION,
			notificationtemplates.getExpireDuration());
	
	document.addTextSortable(NotificationTemplateTerm.USER_URL_PARTTERN,
			notificationtemplates.getUserUrlPattern());
	
	document.addTextSortable(NotificationTemplateTerm.GUEST_URL_PARTTERN,
			notificationtemplates.getGuestUrlPattern());
	
	document.addTextSortable(NotificationTemplateTerm.INTERVAL,
			notificationtemplates.getInterval());
	
	document.addTextSortable(NotificationTemplateTerm.GROUPING,
			String.valueOf(notificationtemplates.getGrouping()));
	
	document.setSortableTextFields(new String[] { NotificationTemplateTerm.NOTIFICATTION_TYPE });

	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:50,代码来源:NotificationTemplateIndexer.java

示例15: doGetDocument

import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(ServiceConfig object) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, object);

	// Indexer of audit fields
	document.addNumberSortable(Field.COMPANY_ID, object.getCompanyId());
	document.addNumberSortable(Field.GROUP_ID, object.getGroupId());
	document.addDateSortable(Field.MODIFIED_DATE, object.getCreateDate());
	document.addDateSortable(Field.CREATE_DATE, object.getModifiedDate());
	document.addNumberSortable(Field.USER_ID, object.getUserId());
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(object.getUserName()));
	document.addKeywordSortable(Field.ENTRY_CLASS_NAME, CLASS_NAME);
	document.addNumberSortable(Field.ENTRY_CLASS_PK, object.getPrimaryKey());

	// add number fields
	document.addNumberSortable(ServiceConfigTerm.SERVICE_LEVEL, object.getServiceLevel());
	document.addNumberSortable(ServiceConfigTerm.SERVICEINFO_ID, object.getServiceInfoId());

	// add text fields
	document.addTextSortable(ServiceConfigTerm.GOVAGENCY_CODE, object.getGovAgencyCode());
	document.addTextSortable(ServiceConfigTerm.GOVAGENCY_NAME, object.getGovAgencyName());
	document.addTextSortable(ServiceConfigTerm.SERVICE_INSTRUCTION, object.getServiceInstruction());
	document.addTextSortable(ServiceConfigTerm.SERVICE_URL, object.getServiceUrl());
	document.addTextSortable(ServiceConfigTerm.FOR_CITIZEN, Boolean.toString(object.getForCitizen()));
	document.addTextSortable(ServiceConfigTerm.FOR_BUSINESS, Boolean.toString(object.getForBusiness()));
	document.addTextSortable(ServiceConfigTerm.POSTAL_SERVICE, Boolean.toString(object.getPostService()));
	document.addTextSortable(ServiceConfigTerm.REGISTRATION, Boolean.toString(object.getRegistration()));

	// add extend fields

	ServiceInfo serviceInfo = null;

	try {
		serviceInfo = ServiceInfoLocalServiceUtil.getServiceInfo(object.getServiceInfoId());
	} catch (Exception e) {

	}

	if (Validator.isNotNull(serviceInfo)) {
		document.addTextSortable(ServiceConfigTerm.SERVICE_CODE, serviceInfo.getServiceCode());
		document.addTextSortable(ServiceConfigTerm.SERVICE_NAME, serviceInfo.getServiceName());
		document.addTextSortable(ServiceConfigTerm.DOMAIN_CODE, serviceInfo.getDomainCode());
		document.addTextSortable(ServiceConfigTerm.DOMAIN_NAME, serviceInfo.getDomainName());
	}
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:47,代码来源:ServiceConfigIndexer.java


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