本文整理汇总了Java中com.liferay.portal.kernel.search.Document.addDateSortable方法的典型用法代码示例。如果您正苦于以下问题:Java Document.addDateSortable方法的具体用法?Java Document.addDateSortable怎么用?Java Document.addDateSortable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.search.Document
的用法示例。
在下文中一共展示了Document.addDateSortable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例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;
}
示例3: 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;
}
示例4: 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;
}
示例5: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(Contact contact) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, contact);
// Set document field values (in alphabetical order)
document.addTextSortable("city", contact.getAddress().getLocality());
document.addTextSortable("company", contact.getCompany());
document.addNumberSortable("contactId", contact.getContactId());
document.addText(Field.CONTENT, contact.getCard());
document.addTextSortable("country", contact.getAddress().getCountry());
document.addDateSortable(Field.CREATE_DATE, contact.getCreateDate());
document.addText(Field.DESCRIPTION, "TODO: contact description");
document.addTextSortable("email", contact.getEmail().getAddress());
// TODO: add default fax
document.addTextSortable("fullName", contact.getFullName(false));
document.addKeyword(Field.GROUP_ID, getSiteGroupId(contact.getGroupId()));
// TODO add default impp
document.addDateSortable("modifiedDate", contact.getModifiedDate());
document.addTextSortable(Field.NAME, contact.getName());
document.addTextSortable("phone", contact.getPhone().getNumber());
document.addNumber(Field.STATUS, contact.getStatus());
document.addKeyword(Field.SCOPE_GROUP_ID, contact.getGroupId());
document.addText(Field.TITLE, contact.getName());
document.addTextSortable("url", contact.getUrl());
document.addKeyword("vCardUID", contact.getUid());
document.addTextSortable("x-salutation", contact.getSalutation());
return document;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: 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;
}
示例11: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(Holiday holiday) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, holiday);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(holiday.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, holiday.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(holiday.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(holiday.getUserName()));
document.addNumberSortable(HolidayTerm.HOLIDAY_ID, holiday.getHolidayId());
document.addDateSortable(HolidayTerm.HOLIDAY_DATE, holiday.getHolidayDate());
document.addNumberSortable(HolidayTerm.GROUP_ID, holiday.getGroupId());
document.addTextSortable(HolidayTerm.DESCRIPTION, holiday.getDescription());
Calendar cal = Calendar.getInstance();
cal.setTime(holiday.getHolidayDate());
String dateTime = String.valueOf(cal.get(Calendar.YEAR));
document.addTextSortable("year", dateTime);
document.setSortableTextFields(
new String[] { HolidayTerm.CREATE_DATE});
return document;
}
示例12: 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;
}
示例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;
}
示例14: doGetDocument
import com.liferay.portal.kernel.search.Document; //导入方法依赖的package包/类
@Override
protected Document doGetDocument(DictItemGroup dictItemGroup) throws Exception {
Document document = getBaseModelDocument(CLASS_NAME, dictItemGroup);
document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(dictItemGroup.getCompanyId()));
document.addDateSortable(Field.MODIFIED_DATE, dictItemGroup.getModifiedDate());
document.addKeywordSortable(Field.USER_ID, String.valueOf(dictItemGroup.getUserId()));
document.addKeywordSortable(Field.USER_NAME, String.valueOf(dictItemGroup.getUserName()));
document.addNumberSortable(DictItemGroupTerm.GROUP_ID, dictItemGroup.getGroupId());
document.addNumberSortable(DictItemGroupTerm.DICT_ITEM_GROUP_ID, dictItemGroup.getDictItemGroupId());
document.addNumberSortable(DictItemGroupTerm.DICT_GROUP_ID, dictItemGroup.getDictGroupId());
document.addNumberSortable(DictItemGroupTerm.DICT_ITEM_ID, dictItemGroup.getDictItemId());
DictGroup dictGroup = DictGroupLocalServiceUtil.fetchDictGroup(dictItemGroup.getDictGroupId());
if(Validator.isNotNull(dictGroup)){
DictCollection collection = DictCollectionLocalServiceUtil.fetchDictCollection(dictGroup.getDictCollectionId());
String collectionCode = StringPool.BLANK;
if (Validator.isNotNull(collection)) {
collectionCode = collection.getCollectionCode();
}
document.addNumberSortable(DictGroupTerm.DICT_GROUPID, dictGroup.getDictGroupId());
document.addNumberSortable(DictGroupTerm.DICT_COLLECTIONID, dictGroup.getDictCollectionId());
document.addTextSortable(DictGroupTerm.DICT_COLLECTION_CODE, collectionCode);
document.addTextSortable(DictGroupTerm.GROUP_CODE, dictGroup.getGroupCode());
_log.info(dictGroup.getGroupCode());
document.addTextSortable(DictGroupTerm.GROUP_NAME, dictGroup.getGroupName());
document.addTextSortable(DictGroupTerm.GROUP_NAME_EN, dictGroup.getGroupNameEN());
document.addTextSortable(DictGroupTerm.GROUP_DESCRIPTION, dictGroup.getGroupDescription());
}
DictItem dictItem = DictItemLocalServiceUtil.fetchDictItem(dictItemGroup.getDictItemId());
if(Validator.isNotNull(dictItem)){
document.addTextSortable(DictItemGroupTerm.ITEM_CODE, dictItem.getItemCode());
document.addTextSortable(DictItemGroupTerm.ITEM_NAME, dictItem.getItemName());
document.addTextSortable(DictItemGroupTerm.ITEM_NAME_EN, dictItem.getItemNameEN());
document.addTextSortable(DictItemGroupTerm.ITEM_DESCRIPTION, dictItem.getItemDescription());
document.addTextSortable(DictItemGroupTerm.SELECTED, Boolean.TRUE.toString());
}
return document;
}
示例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;
}