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


Java KRADUtils.isNotNull方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.util.KRADUtils.isNotNull方法的典型用法代码示例。如果您正苦于以下问题:Java KRADUtils.isNotNull方法的具体用法?Java KRADUtils.isNotNull怎么用?Java KRADUtils.isNotNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.util.KRADUtils的用法示例。


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

示例1: setupPrincipal

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
@Override
protected boolean setupPrincipal(IdentityManagementPersonDocument identityManagementPersonDocument,EntityBo kimEntity, List<PrincipalBo> origPrincipals) {
   	boolean inactivatingPrincipal = false;
	List<PrincipalBo> principals = new ArrayList<PrincipalBo>();
	Principal.Builder principal = Principal.Builder.create(identityManagementPersonDocument.getPrincipalName());
	principal.setPrincipalId(identityManagementPersonDocument.getPrincipalId());
	//principal.setPassword(identityManagementPersonDocument.getPassword());
	principal.setActive(identityManagementPersonDocument.isActive());
	principal.setEntityId(identityManagementPersonDocument.getEntityId());
	if(KRADUtils.isNotNull(origPrincipals)){
		for (PrincipalBo prncpl : origPrincipals) {
			if (prncpl.getPrincipalId()!=null && StringUtils.equals(prncpl.getPrincipalId(), principal.getPrincipalId())) {
				principal.setVersionNumber(prncpl.getVersionNumber());
                   principal.setObjectId(prncpl.getObjectId());
				// check if inactivating the principal
				if ( prncpl.isActive() && !principal.isActive() ) {
					inactivatingPrincipal = true;
				}
			}
		}
	}
	principals.add(PrincipalBo.from(principal.build()));

	kimEntity.setPrincipals(principals);
	return inactivatingPrincipal;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:LdapUiDocumentServiceImpl.java

示例2: getUnresolvedInheritedDocHandlerUrl

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
/**
 * This method retrieves the unresolved document handler URL either from this object or from a parent document type
 * object. If the forDisplayPurposes value is true the value returned will be invalid for system use.
 * <p/>
 * This method will first call the {@link #getUnresolvedDocHandlerUrl()} method to check for a value on this object.
 * If none is found a parent document type must exist because the document handler URL is required and is used. The
 * system will use inheritance to find the document handler url from a document type somewhere in the hierarchy.
 *
 * @param forDisplayPurposes - if true then the string returned will have a label explaining where the value came from
 * @return the unresolved document handler URL value or a displayable value with sourcing information
 */
protected String getUnresolvedInheritedDocHandlerUrl(boolean forDisplayPurposes) {
    if (StringUtils.isNotBlank(getUnresolvedDocHandlerUrl())) {
        // this object has a direct value set, so return it
        return getUnresolvedDocHandlerUrl();
    }
    // check for a parent document to see if the doc handler url can be inherited
    DocumentType docType = getParentDocType();
    if (KRADUtils.isNotNull(docType)) {
        String parentValue = docType.getUnresolvedDocHandlerUrl();
        if (StringUtils.isNotBlank(parentValue)) {
            // found a parent value set on the immediate parent object so return it
            if (forDisplayPurposes) {
                parentValue += " " + KewApiConstants.DOCUMENT_TYPE_INHERITED_VALUE_INDICATOR;
            }
            return parentValue;
        }
        // no valid value exists on the immediate parent, so check the hierarchy
        return docType.getUnresolvedInheritedDocHandlerUrl(forDisplayPurposes);
    }
    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:33,代码来源:DocumentType.java

示例3: getInheritedPostProcessorName

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
/**
 * This method gets the post processor class value. If the forDisplayPurposes value is true
 * the value will be invalid for system use.
 * <p/>
 * This method will first call the {@link #getPostProcessorName()} method to check the value on this object.
 * If none is found the system checks for a parent document type.  If a valid parent type exists for this document type
 * then the system will use inheritance from that parent document type as long as at least one document type in the
 * hierarchy has a value set.  If no value is set on any parent document type or if no parent document type exists the
 * system will return null.
 *
 * @param forDisplayPurposes - if true then the string returned will have a label explaining where the value came from
 * @return the post processor class value or a displayable value with sourcing information
 */
protected String getInheritedPostProcessorName(boolean forDisplayPurposes) {
    if (StringUtils.isNotBlank(getPostProcessorName())) {
        // this object has a post processor class so return it
        return getPostProcessorName();
    }
    if (KRADUtils.isNotNull(getParentDocType())) {
        // direct parent document type exists
        String parentValue = getParentDocType().getPostProcessorName();
        if (StringUtils.isNotBlank(parentValue)) {
            // found a post processor class set on the immediate parent object so return it
            if (forDisplayPurposes) {
                parentValue += " " + KewApiConstants.DOCUMENT_TYPE_INHERITED_VALUE_INDICATOR;
            }
            return parentValue;
        }
        // did not find a valid value on the immediate parent, so use hierarchy
        return getParentDocType().getInheritedPostProcessorName(forDisplayPurposes);
    }
    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:34,代码来源:DocumentType.java

示例4: getNotificationFromAddress

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
/**
 * This method gets the notification from address value. If the forDisplayPurposes value is true
 * the notification from address value will be invalid for system use
 * <p/>
 * This method will first call the {@link #getActualNotificationFromAddress()} method to check the value on this object.
 * If none is found the system checks for a parent document type.  If a valid parent type exists for this document type
 * then the system will use inheritance from that parent document type as long as at least one document type in the
 * hierarchy has a value set.  If no value is set on any parent document type or if no parent document type exists the
 * system will return null
 *
 * @param forDisplayPurposes - if true then the string returned will have a label explaining where the value came from
 * @return the notification from address value or a displayable value with sourcing information
 */
protected String getNotificationFromAddress(boolean forDisplayPurposes) {
    if (StringUtils.isNotBlank(getActualNotificationFromAddress())) {
        // this object has an address so return it
        return getActualNotificationFromAddress();
    }
    if (KRADUtils.isNotNull(getParentDocType())) {
        // direct parent document type exists
        String parentNotificationFromAddress = getParentDocType().getActualNotificationFromAddress();
        if (StringUtils.isNotBlank(parentNotificationFromAddress)) {
            // found an address set on the immediate parent object so return it
            if (forDisplayPurposes) {
                parentNotificationFromAddress += " " + KewApiConstants.DOCUMENT_TYPE_INHERITED_VALUE_INDICATOR;
            }
            return parentNotificationFromAddress;
        }
        // did not find a valid address on the immediate parent to use hierarchy
        return getParentDocType().getNotificationFromAddress(forDisplayPurposes);
    }
    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:34,代码来源:DocumentType.java

示例5: getApplicationId

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
/**
 * This method gets the string for the application id value. If the forDisplayPurposes value is true
 * the application id value will be invalid for system use.
 * <p/>
 * This method will first call the {@link #getActualApplicationId()} method to check for a value on this object. If
 * none is found a parent document type is used.  If a valid parent type exists for this document type then the system
 * will use inheritance from that parent document type as long as at least one document type in the hierarchy has a
 * value set.  If no value is set on any parent document type or if no parent document type exists for this object the
 * system default is used: {@link CoreConfigHelper#getApplicationId()}
 *
 * @param forDisplayPurposes - if true then the string returned will have a label explaining where the value came from
 * @return the application id value or a displayable value with sourcing information
 */
protected String getApplicationId(boolean forDisplayPurposes) {
    if (StringUtils.isNotBlank(getActualApplicationId())) {
        // this object has a application id set, so return it
        return getActualApplicationId();
    }
    // this object has no application id... check for a parent document type
    if (KRADUtils.isNotNull(getParentDocType())) {
        // direct parent document type exists
        String parentValue = getParentDocType().getActualApplicationId();
        if (StringUtils.isNotBlank(parentValue)) {
            // found a parent value set on the immediate parent object so return it
            if (forDisplayPurposes) {
                parentValue += " " + KewApiConstants.DOCUMENT_TYPE_INHERITED_VALUE_INDICATOR;
            }
            return parentValue;
        }
        // no valid application id on direct parent, so use hierarchy to find correct value
        return getParentDocType().getApplicationId(forDisplayPurposes);
    }
    String defaultValue = CoreConfigHelper.getApplicationId();
    if (forDisplayPurposes) {
        defaultValue += " " + KewApiConstants.DOCUMENT_TYPE_SYSTEM_DEFAULT_INDICATOR;
    }
    return defaultValue;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:39,代码来源:DocumentType.java

示例6: validateReferenceExists

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DictionaryValidationService#validateReferenceExists(java.lang.Object dataObject,
 * java.lang.String)
 */
@Override
public boolean validateReferenceExists(Object dataObject, String referenceName) {

    // attempt to retrieve the specified object from the db
    Object referenceDataObject = getLegacyDataAdapter().getReferenceIfExists(dataObject, referenceName);

    // if it isn't there, then it doesn't exist, return false
    if (KRADUtils.isNotNull(referenceDataObject)) {
        return true;
    }

    // otherwise, it is there, return true
    return false;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:DictionaryValidationServiceImpl.java

示例7: deleteProposition

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
@RequestMapping(params = "methodToCall=" + "deleteProposition")
public ModelAndView deleteProposition(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result,
        HttpServletRequest request, HttpServletResponse response)
        throws Exception {
    AgendaEditor agendaEditor = getAgendaEditor(form);
    String selectedPropId = agendaEditor.getSelectedPropositionId();
    Node<RuleTreeNode, String> root = agendaEditor.getAgendaItemLine().getRule().getPropositionTree().getRootElement();

    Node<RuleTreeNode, String> parentNode = findParentPropositionNode(root, selectedPropId);

    // what if it is the root?
    if (parentNode != null && parentNode.getData() != null) { // it is not the root as there is a parent w/ a prop
        PropositionBo parent = parentNode.getData().getProposition();
        if (parent != null){
            List <PropositionBo> children = parent.getCompoundComponents();
            for( int index=0; index< children.size(); index++){
                if (selectedPropId.equalsIgnoreCase(children.get(index).getId())){
                    parent.getCompoundComponents().remove(index);
                    break;
                }
            }
        }
    } else { // no parent, it is the root
        if (KRADUtils.isNotNull(parentNode)) {
            parentNode.getChildren().clear();
            agendaEditor.getAgendaItemLine().getRule().getPropositionTree().setRootElement(null);
            agendaEditor.getAgendaItemLine().getRule().setProposition(null);
        } else {
            GlobalVariables.getMessageMap().putError(KRMSPropertyConstants.Rule.PROPOSITION_TREE_GROUP_ID,
                    "error.rule.proposition.noneHighlighted");
        }
    }

    agendaEditor.getDeletedPropositionIdsFromRule().add(selectedPropId);
    agendaEditor.getAgendaItemLine().getRule().refreshPropositionTree(false);

    return getModelAndView(form);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:39,代码来源:AgendaEditorController.java

示例8: loadNames

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
@Override
protected List<PersonDocumentName> loadNames( IdentityManagementPersonDocument personDoc, String principalId, List <EntityName> names, boolean suppressDisplay ) {
	List<PersonDocumentName> docNames = new ArrayList<PersonDocumentName>();
	if(KRADUtils.isNotNull(names)){
		for (EntityName name: names) {
			if(name.isActive()){
				PersonDocumentName docName = new PersonDocumentName();
                   if (name.getNameType() != null) {
				    docName.setNameCode(name.getNameType().getCode());
                   }

				//We do not need to check the privacy setting here - The UI should care of it
				docName.setFirstName(name.getFirstNameUnmasked());
				docName.setLastName(name.getLastNameUnmasked());
				docName.setMiddleName(name.getMiddleNameUnmasked());
				docName.setNamePrefix(name.getNamePrefixUnmasked());
				docName.setNameSuffix(name.getNameSuffixUnmasked());

				docName.setActive(name.isActive());
				docName.setDflt(name.isDefaultValue());
				docName.setEdit(true);
				docName.setEntityNameId(name.getId());
				docNames.add(docName);
			}
		}
	}
	return docNames;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:LdapUiDocumentServiceImpl.java

示例9: loadEmails

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
@Override
protected List<PersonDocumentEmail> loadEmails(IdentityManagementPersonDocument identityManagementPersonDocument, String principalId, List<EntityEmail> entityEmails, boolean suppressDisplay ) {
	List<PersonDocumentEmail> emails = new ArrayList<PersonDocumentEmail>();
	if(KRADUtils.isNotNull(entityEmails)){
		for (EntityEmail email: entityEmails) {
			if(email.isActive()){
				PersonDocumentEmail docEmail = new PersonDocumentEmail();
				//docEmail.setEntityId(email.getEntityId());
				docEmail.setEntityTypeCode(email.getEntityTypeCode());
                   if (email.getEmailType() != null) {
				    docEmail.setEmailTypeCode(email.getEmailType().getCode());
                   }
				// EmailType not on info object.
				//docEmail.setEmailType(((KimEntityEmailImpl)email).getEmailType());
				//We do not need to check the privacy setting here - The UI should care of it
				docEmail.setEmailAddress(email.getEmailAddressUnmasked());

				docEmail.setActive(email.isActive());
				docEmail.setDflt(email.isDefaultValue());
				docEmail.setEntityEmailId(email.getId());
				docEmail.setEdit(true);
				emails.add(docEmail);
			}
		}
	}
	return emails;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:LdapUiDocumentServiceImpl.java

示例10: verifyDocumentTypeLinking

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
protected void verifyDocumentTypeLinking() throws Exception {
  	DocumentTypeService service = KEWServiceLocator.getDocumentTypeService();
  	List rootDocs = service.findAllCurrentRootDocuments();
  	int numRoots = rootDocs.size();
  	List documentTypes = service.findAllCurrent();
  	List<DocumentType> leafs = new ArrayList<DocumentType>();
  	for (Iterator iterator = documentTypes.iterator(); iterator.hasNext();) {
	DocumentType documentType = (DocumentType) iterator.next();
	// check that all document types with parents are current
	if (KRADUtils.isNotNull(documentType.getParentDocType())) {
	    assertEquals("Parent of document type '" + documentType.getName() + "' should be Current", Boolean.TRUE, documentType.getParentDocType().getCurrentInd());
	}
	List children = service.getChildDocumentTypes(documentType.getDocumentTypeId());
	if (children.isEmpty()) {
		leafs.add(documentType);
	} else {
           // check that all child document types are current
	    for (Iterator iterator2 = children.iterator(); iterator2.hasNext();) {
                  DocumentType childDocType = (DocumentType) iterator2.next();
                  assertEquals("Any child document type should be Current", Boolean.TRUE, childDocType.getCurrentInd());
              }
	}
}
  	Set<String> rootDocIds = new HashSet<String>();
  	// verify the hierarchy
  	for (DocumentType leaf : leafs) {
	verifyHierarchy(leaf, rootDocIds);
}
  	// we should have the same number of roots as we did from the original roots query
  	assertEquals("Should have the same number of roots", numRoots, rootDocIds.size());
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:DocumentTypeTest.java

示例11: getApplicationStatusCategories

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
/**
 * Get the application document status categories for this document type
 *
 * @see ApplicationDocumentStatusCategory
 * @return the application document status categories for this document type
 */
public List<ApplicationDocumentStatusCategory> getApplicationStatusCategories() {
    if((this.validApplicationStatuses == null || this.validApplicationStatuses.isEmpty())
            && KRADUtils.isNotNull(getParentDocType()) && isAppDocStatusInUse()) {
        return getParentDocType().getApplicationStatusCategories();
    }
    return applicationStatusCategories;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:DocumentType.java

示例12: getCustomActionUrls

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
@Override
public List<HtmlData> getCustomActionUrls(BusinessObject businessObject,
        List pkNames) {
    RuleBaseValues ruleBaseValues = (RuleBaseValues)businessObject;
    List<HtmlData> htmlDataList = new ArrayList<HtmlData>();
    if (StringUtils.isNotBlank(ruleBaseValues.getRuleTemplateName()) && StringUtils.isNotBlank(getMaintenanceDocumentTypeName())) {
    	if (ruleBaseValues.getDelegateRule().booleanValue()) {
    		// If the rule is a delegate rule, have the edit/copy links open the rule delegation maintenance document screen instead.
    		List<?> delegationList = KEWServiceLocator.getRuleDelegationService().findByDelegateRuleId(ruleBaseValues.getId());
    		if (KRADUtils.isNotNull(delegationList) && !delegationList.isEmpty()) {
    			BusinessObject ruleDelegation = (BusinessObject) delegationList.get(0);
				// Retrieve the rule delegation lookupable helper service and the primary key names, if they have not been obtained yet.
    	        if (ruleDelegationLookupableHelperService == null) {
    				ruleDelegationLookupableHelperService = KNSServiceLocator.getLookupable(
                            KNSServiceLocator.getBusinessObjectDictionaryService()
                                    .getLookupableID(ruleDelegation.getClass())).getLookupableHelperService();
    				if (ruleDelegationLookupableHelperService.getBusinessObjectClass() == null) {
    					ruleDelegationLookupableHelperService.setBusinessObjectClass(ruleDelegation.getClass());
    				}
                    delegationPkNames = KRADServiceLocatorWeb.getLegacyDataAdapter().listPrimaryKeyFieldNames(ruleDelegation.getClass());
    			}
    	        // Allow the rule delegation's lookupable helper service to handle the custom action URL generation instead.
    			htmlDataList = ruleDelegationLookupableHelperService.getCustomActionUrls(ruleDelegation, delegationPkNames);
    		}
    	} else {
    		// Otherwise, have the links open the regular routing rule maintenance document screen.
    		if (allowsMaintenanceEditAction(businessObject)) {
    			htmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL, pkNames));
    		}
    		if (allowsMaintenanceNewOrCopyAction()) {
            	htmlDataList.add(getUrlData(businessObject, KRADConstants.MAINTENANCE_COPY_METHOD_TO_CALL, pkNames));
        	}
    	}
    }

    return htmlDataList;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:38,代码来源:RuleBaseValuesLookupableHelperServiceImpl.java

示例13: validateUpdatabableReferencesRecursively

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
protected void validateUpdatabableReferencesRecursively(Object businessObject, int maxDepth,
        boolean validateRequired, boolean chompLastLetterSFromCollectionName, Set<Object> processedBOs) {
    // if null or already processed, return
    if (KRADUtils.isNull(businessObject) || processedBOs.contains(businessObject)) {
        return;
    }
    processedBOs.add(businessObject);  // add bo to list to prevent excessive looping
    Map<String, Class> references = getLegacyDataAdapter().listReferenceObjectFields(businessObject.getClass());
    for (String referenceName : references.keySet()) {
        if (getLegacyDataAdapter().isReferenceUpdatable(businessObject.getClass(), referenceName)) {
            Object referenceObj = KradDataServiceLocator.getDataObjectService().wrap(businessObject)
                    .getPropertyValueNullSafe(referenceName);

            if (KRADUtils.isNull(referenceObj) || !(referenceObj instanceof PersistableBusinessObject)) {
                continue;
            }

            BusinessObject referenceBusinessObject = (BusinessObject) referenceObj;
            GlobalVariables.getMessageMap().addToErrorPath(referenceName);
            validateBusinessObject(referenceBusinessObject, validateRequired);
            if (maxDepth > 0) {
                validateUpdatabableReferencesRecursively(referenceBusinessObject, maxDepth - 1, validateRequired,
                        chompLastLetterSFromCollectionName, processedBOs);
            }
            GlobalVariables.getMessageMap().removeFromErrorPath(referenceName);
        }
    }
    Map<String, Class> collections = getLegacyDataAdapter().listCollectionObjectTypes(businessObject.getClass());
    for (String collectionName : collections.keySet()) {
        if (getLegacyDataAdapter().isCollectionUpdatable(businessObject.getClass(), collectionName)) {
            Object listObj = KradDataServiceLocator.getDataObjectService().wrap(businessObject)
                    .getPropertyValueNullSafe(collectionName);

            if (KRADUtils.isNull(listObj)) {
                continue;
            }

            if (!(listObj instanceof List)) {
                if (LOG.isInfoEnabled()) {
                    LOG.info("The reference named " + collectionName + " of BO class " +
                            businessObject.getClass().getName() +
                            " should be of type java.util.List to be validated properly.");
                }
                continue;
            }

            List list = (List) listObj;

            //should we materialize the proxied collection or just skip validation here assuming an unmaterialized objects are valid?
            KRADUtils.materializeObjects(list);

            for (int i = 0; i < list.size(); i++) {
                final Object o = list.get(i);
                if (KRADUtils.isNotNull(o) && o instanceof PersistableBusinessObject) {
                    final BusinessObject element = (BusinessObject) o;

                    final String errorPathAddition;
                    if (chompLastLetterSFromCollectionName) {
                        errorPathAddition = StringUtils.chomp(collectionName, "s")
                                + "["
                                + Integer.toString(i)
                                + "]";
                    } else {
                        errorPathAddition = collectionName + "[" + Integer.toString(i) + "]";
                    }

                    GlobalVariables.getMessageMap().addToErrorPath(errorPathAddition);
                    validateBusinessObject(element, validateRequired);
                    if (maxDepth > 0) {
                        validateUpdatabableReferencesRecursively(element, maxDepth - 1, validateRequired,
                                chompLastLetterSFromCollectionName, processedBOs);
                    }
                    GlobalVariables.getMessageMap().removeFromErrorPath(errorPathAddition);
                }
            }
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:79,代码来源:DictionaryValidationServiceImpl.java

示例14: loadAffiliations

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
@Override
protected List<PersonDocumentAffiliation> loadAffiliations(List <EntityAffiliation> affiliations, List<EntityEmployment> empInfos) {
	List<PersonDocumentAffiliation> docAffiliations = new ArrayList<PersonDocumentAffiliation>();
	if(KRADUtils.isNotNull(affiliations)){
		for (EntityAffiliation affiliation: affiliations) {
			if(affiliation.isActive()){
				PersonDocumentAffiliation docAffiliation = new PersonDocumentAffiliation();
				docAffiliation.setAffiliationTypeCode(affiliation.getAffiliationType().getCode());
				docAffiliation.setCampusCode(affiliation.getCampusCode());
				docAffiliation.setActive(affiliation.isActive());
				docAffiliation.setDflt(affiliation.isDefaultValue());
				docAffiliation.setEntityAffiliationId(affiliation.getId());
				docAffiliation.refreshReferenceObject("affiliationType");
				// EntityAffiliationImpl does not define empinfos as collection
				docAffiliations.add(docAffiliation);
				docAffiliation.setEdit(true);
				// employment informations
				List<PersonDocumentEmploymentInfo> docEmploymentInformations = new ArrayList<PersonDocumentEmploymentInfo>();
				if(KRADUtils.isNotNull(empInfos)){
					for (EntityEmployment empInfo: empInfos) {
						if (empInfo.isActive()
                                   && StringUtils.equals(docAffiliation.getEntityAffiliationId(),
                                                         (empInfo.getEntityAffiliation() != null ? empInfo.getEntityAffiliation().getId() : null))) {
							PersonDocumentEmploymentInfo docEmpInfo = new PersonDocumentEmploymentInfo();
							docEmpInfo.setEntityEmploymentId(empInfo.getEmployeeId());
							docEmpInfo.setEmployeeId(empInfo.getEmployeeId());
							docEmpInfo.setEmploymentRecordId(empInfo.getEmploymentRecordId());
							docEmpInfo.setBaseSalaryAmount(empInfo.getBaseSalaryAmount());
							docEmpInfo.setPrimaryDepartmentCode(empInfo.getPrimaryDepartmentCode());
							docEmpInfo.setEmploymentStatusCode(empInfo.getEmployeeStatus() != null ? empInfo.getEmployeeStatus().getCode() : null);
							docEmpInfo.setEmploymentTypeCode(empInfo.getEmployeeType() != null ? empInfo.getEmployeeType().getCode() : null);
							docEmpInfo.setActive(empInfo.isActive());
							docEmpInfo.setPrimary(empInfo.isPrimary());
							docEmpInfo.setEntityAffiliationId(empInfo.getEntityAffiliation() != null ? empInfo.getEntityAffiliation().getId() : null);
							// there is no version number on KimEntityEmploymentInformationInfo
							//docEmpInfo.setVersionNumber(empInfo.getVersionNumber());
							docEmpInfo.setEdit(true);
							docEmpInfo.refreshReferenceObject("employmentType");
							docEmploymentInformations.add(docEmpInfo);
						}
					}
				}
				docAffiliation.setEmpInfos(docEmploymentInformations);
			}
		}
	}
	return docAffiliations;

}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:50,代码来源:LdapUiDocumentServiceImpl.java

示例15: setSuperUserWorkgroupNoInheritence

import org.kuali.rice.krad.util.KRADUtils; //导入方法依赖的package包/类
public void setSuperUserWorkgroupNoInheritence(Group suWorkgroup) {
    this.workgroupId = null;
    if (KRADUtils.isNotNull(suWorkgroup)) {
        this.workgroupId = suWorkgroup.getId();
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:DocumentType.java


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