本文整理汇总了Java中com.liferay.portal.kernel.search.Document.addKeywordSortable方法的典型用法代码示例。如果您正苦于以下问题:Java Document.addKeywordSortable方法的具体用法?Java Document.addKeywordSortable怎么用?Java Document.addKeywordSortable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.search.Document
的用法示例。
在下文中一共展示了Document.addKeywordSortable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DictGroup dictGroup) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, dictGroup);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(dictGroup.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, dictGroup.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(dictGroup.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(dictGroup.getUserName()));
document.addNumberSortable(DictGroupTerm.GROUP_ID, dictGroup.getGroupId());
document.addNumberSortable(DictGroupTerm.DICT_GROUPID, dictGroup.getDictGroupId());
document.addNumberSortable(DictGroupTerm.DICT_COLLECTIONID, dictGroup.getDictCollectionId());
document.addTextSortable(DictGroupTerm.GROUP_CODE, dictGroup.getGroupCode());
document.addTextSortable(DictGroupTerm.GROUP_NAME, dictGroup.getGroupName());
document.addTextSortable(DictGroupTerm.GROUP_NAME_EN, dictGroup.getGroupNameEN());
document.addTextSortable(DictGroupTerm.GROUP_DESCRIPTION, dictGroup.getGroupDescription());
DictCollection dictCollection = DictCollectionLocalServiceUtil.fetchDictCollection(dictGroup.getDictCollectionId());
String dictCollectionCode = Validator.isNotNull(dictCollection)?dictCollection.getCollectionCode():StringPool.BLANK;
document.addTextSortable(DictGroupTerm.DICT_COLLECTION_CODE, dictCollectionCode);
return document;
}
示例2: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DossierTemplate 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(DossierTemplateTerm.TEMPLATE_NAME, object.getTemplateName());
document.addTextSortable(DossierTemplateTerm.TEMPLATE_NO, object.getTemplateNo());
document.addTextSortable(DossierTemplateTerm.DESCRIPTION, object.getDescription());
return document;
}
示例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;
}
示例4: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(ServiceInfo 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());
document.addKeywordSortable(ServiceInfoTerm.SERVICE_CODE, object.getServiceCode());
document.addKeywordSortable(ServiceInfoTerm.SERVICE_NAME, object.getServiceName());
document.addKeywordSortable(ServiceInfoTerm.PROCESS_TEXT, object.getProcessText());
document.addKeywordSortable(ServiceInfoTerm.METHOD_TEXT, object.getMethodText());
document.addKeywordSortable(ServiceInfoTerm.DOSSIER_EXT, object.getDossierText());
document.addKeywordSortable(ServiceInfoTerm.CONDITION_TEXT, object.getConditionText());
document.addKeywordSortable(ServiceInfoTerm.DURATION_TEXT, object.getDurationText());
document.addKeywordSortable(ServiceInfoTerm.APPLICANT_TEXT, object.getApplicantText());
document.addKeywordSortable(ServiceInfoTerm.RESULT_TEXT, object.getRegularText());
document.addKeywordSortable(ServiceInfoTerm.REGULAR_TEXT, object.getRegularText());
document.addKeywordSortable(ServiceInfoTerm.FEE_TEXT, object.getFeeText());
document.addKeywordSortable(ServiceInfoTerm.ADMINISTRATION_CODE, object.getAdministrationCode());
document.addKeywordSortable(ServiceInfoTerm.ADMINISTRATION_NAME, object.getAdministrationName());
document.addKeywordSortable(ServiceInfoTerm.ADMINISTRATION_INDEX, object.getAdministrationIndex());
document.addKeywordSortable(ServiceInfoTerm.DOMAIN_CODE, object.getDomainCode());
document.addKeywordSortable(ServiceInfoTerm.DOMAIN_NAME, object.getDomainName());
document.addKeywordSortable(ServiceInfoTerm.DOMAIN_INDEX, object.getDomainIndex());
document.addNumberSortable(ServiceInfoTerm.MAX_LEVEL, object.getMaxLevel());
document.addKeywordSortable(ServiceInfoTerm.PUBLIC_, Boolean.toString(object.getPublic_()));
return document;
}
示例5: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DossierStatistic 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(DossierStatisticTerm.DOSSIER_STATISTIC_ID, object.getDossierStatisticId());
document.addNumberSortable(DossierStatisticTerm.MONTH, object.getMonth());
document.addNumberSortable(DossierStatisticTerm.YEAR, object.getYear());
document.addNumberSortable(DossierStatisticTerm.REMAINING_COUNT, object.getRemainingCount());
document.addNumberSortable(DossierStatisticTerm.RECEIVED_COUNT, object.getReceivedCount());
document.addNumberSortable(DossierStatisticTerm.ONLINE_COUNT, object.getOnlineCount());
document.addNumberSortable(DossierStatisticTerm.UNDUE_COUNT, object.getUndueCount());
document.addNumberSortable(DossierStatisticTerm.OVERDUE_COUNT, object.getOverdueCount());
document.addNumberSortable(DossierStatisticTerm.ONTIME_COUNT, object.getOntimeCount());
document.addNumberSortable(DossierStatisticTerm.OVERTIME_COUNT, object.getOvertimeCount());
document.addNumberSortable(DossierStatisticTerm.ADMINISTRATION_LEVEL, object.getAdministrationLevel());
// add text fields
document.addTextSortable(DossierStatisticTerm.GOV_AGENCY_CODE, object.getGovAgencyCode());
document.addTextSortable(DossierStatisticTerm.GOV_AGENCY_NAME, object.getGovAgencyName());
document.addTextSortable(DossierStatisticTerm.DOMAIN_CODE, object.getDomainCode());
document.addTextSortable(DossierStatisticTerm.DOMAIN_NAME, object.getDomainName());
document.addKeywordSortable(DossierStatisticTerm.REPORTING, object.getReporting());
return document;
}
示例6: 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;
}
示例7: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(OfficeSite officeSite) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, officeSite);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(officeSite.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, officeSite.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(officeSite.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(officeSite.getUserName()));
document.addNumberSortable(OfficeSiteTerm.OFFICE_SITE_ID, officeSite.getOfficeSiteId());
document.addNumberSortable(OfficeSiteTerm.GROUP_ID, officeSite.getGroupId());
document.addTextSortable(OfficeSiteTerm.NAME, officeSite.getName());
document.addTextSortable(OfficeSiteTerm.EN_NAME, officeSite.getEnName());
document.addTextSortable(OfficeSiteTerm.GOV_AGENCY_CODE, officeSite.getGovAgencyCode());
document.addTextSortable(OfficeSiteTerm.ADDRESS, officeSite.getAddress());
document.addTextSortable(OfficeSiteTerm.TEL_NO, officeSite.getTelNo());
document.addTextSortable(OfficeSiteTerm.FAX_NO, officeSite.getFaxNo());
document.addTextSortable(OfficeSiteTerm.EMAIL, officeSite.getEmail());
document.addTextSortable(OfficeSiteTerm.WEBSITE, officeSite.getWebsite());
document.addNumberSortable(OfficeSiteTerm.LOGO_FILE_ENTRY_ID, officeSite.getLogoFileEntryId());
document.addNumberSortable(OfficeSiteTerm.SITE_GROUP_ID, officeSite.getSiteGroupId());
document.addNumberSortable(OfficeSiteTerm.ADMIN_USER_ID, officeSite.getAdminUserId());
document.addTextSortable(OfficeSiteTerm.PREFERENCES, officeSite.getPreferences());
User adminUser = UserLocalServiceUtil.fetchUser(officeSite.getAdminUserId());
if(Validator.isNotNull(adminUser)){
document.addTextSortable("adminUser_screenName", adminUser.getScreenName());
document.addTextSortable("adminUser_email", adminUser.getEmailAddress());
}
return document;
}
示例8: 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;
}
示例9: 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;
}
示例10: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(EmployeeJobPos employeeJobPos) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, employeeJobPos);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(employeeJobPos.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, employeeJobPos.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(employeeJobPos.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(employeeJobPos.getUserName()));
document.addNumberSortable(EmployeeJobPosTerm.GROUP_ID, employeeJobPos.getGroupId());
document.addNumberSortable(EmployeeJobPosTerm.EMPLOYEE_JOBPOST_ID, employeeJobPos.getEmployeeJobPosId());
document.addNumberSortable(EmployeeJobPosTerm.EMPLOYEE_ID, employeeJobPos.getEmployeeId());
document.addNumberSortable(EmployeeJobPosTerm.JOBPOST_ID, employeeJobPos.getJobPostId());
document.addNumberSortable(EmployeeJobPosTerm.WORKING_UNIT_ID, employeeJobPos.getWorkingUnitId());
WorkingUnit workingUnit = WorkingUnitLocalServiceUtil.fetchWorkingUnit(employeeJobPos.getWorkingUnitId());
document.addTextSortable(EmployeeJobPosTerm.WORKING_UNIT_NAME, Validator.isNotNull(workingUnit)?workingUnit.getName():StringPool.BLANK);
String title = StringPool.BLANK;
int leader = 0;
JobPos jobPos = JobPosLocalServiceUtil.fetchJobPos(employeeJobPos.getJobPostId());
if(Validator.isNotNull(jobPos)){
title = jobPos.getTitle();
leader = jobPos.getLeader();
}
document.addTextSortable(EmployeeJobPosTerm.JOBPOST_TITLE, title);
document.addNumberSortable(EmployeeJobPosTerm.LEADER, leader);
return document;
}
示例11: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(ResourceRole resourceRole) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, resourceRole);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(resourceRole.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, resourceRole.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(resourceRole.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(resourceRole.getUserName()));
document.addNumberSortable(ResourceRoleTerm.GROUP_ID, resourceRole.getGroupId());
document.addNumberSortable(ResourceRoleTerm.RESOURCEROLE_ID, resourceRole.getResourceRoleId());
document.addTextSortable(ResourceRoleTerm.CLASS_NAME, resourceRole.getClassName());
document.addTextSortable(ResourceRoleTerm.CLASS_PK, resourceRole.getClassPK());
document.addNumberSortable(ResourceRoleTerm.ROLE_ID, resourceRole.getRoleId());
document.addTextSortable("selected", Boolean.TRUE.toString());
Role role = RoleLocalServiceUtil.fetchRole(resourceRole.getRoleId());
String roleName = StringPool.BLANK;
if (Validator.isNotNull(role)) {
roleName = role.getName();
}
document.addTextSortable(ResourceRoleTerm.ROLE_NAME, roleName);
return document;
}
示例12: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(FileAttach fileAttach) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, fileAttach);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(fileAttach.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, fileAttach.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(fileAttach.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(fileAttach.getUserName()));
document.addNumberSortable(FileAttachTerm.FILEATTACH_ID, fileAttach.getFileAttachId());
document.addNumberSortable(FileAttachTerm.GROUP_ID, fileAttach.getGroupId());
document.addTextSortable(FileAttachTerm.CLASS_NAME, fileAttach.getClassName());
document.addTextSortable(FileAttachTerm.CLASS_PK, fileAttach.getClassPK());
document.addTextSortable(FileAttachTerm.FULLNAME, fileAttach.getFullName());
document.addTextSortable(FileAttachTerm.EMAIL, fileAttach.getEmail());
document.addNumberSortable(FileAttachTerm.FILE_ENTRY_ID, fileAttach.getFileEntryId());
document.addTextSortable(FileAttachTerm.SOURCE, fileAttach.getSource());
document.addTextSortable(FileAttachTerm.SOURCE_URL, fileAttach.getSourceUrl());
document.addNumberSortable(FileAttachTerm.DOCFILE_ID, fileAttach.getDocFileId());
document.addTextSortable(FileAttachTerm.FILE_NAME, fileAttach.getFileName());
document.setSortableTextFields(new String[] { FileAttachTerm.CREATE_DATE });
return document;
}
示例13: 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;
}
示例14: 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;
}
示例15: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DictItem dictItem) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, dictItem);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(dictItem.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, dictItem.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(dictItem.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(dictItem.getUserName()));
document.addNumberSortable(DictItemTerm.GROUP_ID, dictItem.getGroupId());
document.addNumberSortable(DictItemTerm.DICT_ITEM_ID, dictItem.getDictItemId());
document.addNumberSortable(DictItemTerm.DICT_COLLECTION_ID, dictItem.getDictCollectionId());
document.addTextSortable(DictItemTerm.ITEM_CODE, dictItem.getItemCode());
document.addTextSortable(DictItemTerm.ITEM_NAME, dictItem.getItemName());
document.addTextSortable(DictItemTerm.ITEM_NAME_EN, dictItem.getItemNameEN());
document.addTextSortable(DictItemTerm.ITEM_DESCRIPTION, dictItem.getItemDescription());
document.addNumberSortable(DictItemTerm.PARENT_ITEM_ID, dictItem.getParentItemId());
document.addTextSortable(DictItemTerm.SIBLING, dictItem.getSibling());
document.addTextSortable(DictItemTerm.TREE_INDEX, dictItem.getTreeIndex());
document.addNumberSortable(DictItemTerm.LEVEL, dictItem.getLevel());
document.addTextSortable(DictItemTerm.META_DATA, dictItem.getMetaData());
long dictCollectionId = dictItem.getDictCollectionId();
DictCollection dictCollection = DictCollectionLocalServiceUtil.fetchDictCollection(dictCollectionId);
if(Validator.isNotNull(dictCollection)){
document.addTextSortable(DictItemTerm.DICT_COLLECTION_CODE, dictCollection.getCollectionCode());
}
String parentCode = StringPool.BLANK;
if(dictItem.getParentItemId() > 0){
DictItem parentItem = DictItemLocalServiceUtil.fetchDictItem(dictItem.getParentItemId());
if (Validator.isNotNull(parentItem) && Validator.isNotNull(parentItem.getItemCode())) {
parentCode = parentItem.getItemCode();
} else {
_log.info(parentItem.getItemCode());
}
} else {
parentCode = "0";
}
document.addTextSortable(DictItemTerm.PARENT_ITEM_CODE, parentCode);
document.setSortableTextFields(new String[]{DictItemTerm.TREE_INDEX});
return document;
}