當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityCitizenshipBo類代碼示例

本文整理匯總了Java中org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo的典型用法代碼示例。如果您正苦於以下問題:Java EntityCitizenshipBo類的具體用法?Java EntityCitizenshipBo怎麽用?Java EntityCitizenshipBo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EntityCitizenshipBo類屬於org.kuali.rice.kim.impl.identity.citizenship包,在下文中一共展示了EntityCitizenshipBo類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getEntityCitizenshipBo

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
protected EntityCitizenshipBo getEntityCitizenshipBo(String entityId, String citizenshipStatusCode) {
    if (StringUtils.isEmpty(entityId) || StringUtils.isEmpty(citizenshipStatusCode)) {
        return null;
    }
    Map<String, Object> criteria = new HashMap<String, Object>(4);
    criteria.put(KIMPropertyConstants.Entity.ENTITY_ID, entityId);
    criteria.put("statusCode", citizenshipStatusCode);
    criteria.put(KIMPropertyConstants.Entity.ACTIVE, Boolean.TRUE);
    List<EntityCitizenshipBo> results = dataObjectService.findMatching(EntityCitizenshipBo.class,
            QueryByCriteria.Builder.andAttributes(criteria).build()).getResults();
    if (results.isEmpty()) {
        return null;
    }

    return results.get(0);

}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:18,代碼來源:IdentityServiceImpl.java

示例2: addCitizenshipToEntity

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public EntityCitizenship addCitizenshipToEntity(
        EntityCitizenship citizenship) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(citizenship, "citizenship");

    if (StringUtils.isBlank(citizenship.getEntityId())) {
        throw new RiceIllegalStateException("Citizenship's entityId must be populated before creation");
    } else {
        if (citizenship.getStatus() == null) {
            throw new RiceIllegalStateException("Citizenship's status must be populated before creation");
        }
        if (getEntityCitizenshipBo(citizenship.getEntityId(), citizenship.getStatus().getCode()) != null) {
            throw new RiceIllegalStateException("the EntityCitizenship to create already exists: " + citizenship);
        }
    }
    EntityCitizenshipBo bo = EntityCitizenshipBo.from(citizenship);

    return EntityCitizenshipBo.to(dataObjectService.save(bo));
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:20,代碼來源:IdentityServiceImpl.java

示例3: updateCitizenship

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public EntityCitizenship updateCitizenship(
        EntityCitizenship citizenship) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(citizenship, "citizenship");

    if (StringUtils.isBlank(citizenship.getEntityId())) {
        throw new RiceIllegalStateException("Email's entityId must be populated before creation");
    } else {
        if (citizenship.getStatus() == null) {
            throw new RiceIllegalStateException("Citizenship's status must be populated before creation");
        }
        if (getEntityCitizenshipBo(citizenship.getEntityId(), citizenship.getStatus().getCode()) == null) {
            throw new RiceIllegalStateException("the EntityCitizenship to update does not exist: " + citizenship);
        }
    }
    EntityCitizenshipBo bo = EntityCitizenshipBo.from(citizenship);

    return EntityCitizenshipBo.to(dataObjectService.save(bo));
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:20,代碼來源:IdentityServiceImpl.java

示例4: addCitizenshipToEntity

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public EntityCitizenship addCitizenshipToEntity(EntityCitizenship citizenship) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(citizenship, "citizenship");

    if (StringUtils.isEmpty(citizenship.getEntityId()) || StringUtils.isBlank(citizenship.getEntityId())) {
        throw new RiceIllegalStateException("Citizenship's entityId must be populated before creation");
    }  else {
        if (citizenship.getStatus() == null) {
            throw new RiceIllegalStateException("Citizenship's status must be populated before creation");
        }
        if (getEntityCitizenshipBo(citizenship.getEntityId(), citizenship.getStatus().getCode()) != null) {
            throw new RiceIllegalStateException("the EntityCitizenship to create already exists: " + citizenship);
        }
    }
    EntityCitizenshipBo bo = EntityCitizenshipBo.from(citizenship);
    return EntityCitizenshipBo.to(businessObjectService.save(bo));
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:18,代碼來源:IdentityServiceImpl.java

示例5: updateCitizenship

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public EntityCitizenship updateCitizenship(EntityCitizenship citizenship) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(citizenship, "citizenship");

    if (StringUtils.isEmpty(citizenship.getEntityId()) || StringUtils.isBlank(citizenship.getEntityId())) {
        throw new RiceIllegalStateException("Email's entityId must be populated before creation");
    }  else {
        if (citizenship.getStatus() == null) {
            throw new RiceIllegalStateException("Citizenship's status must be populated before creation");
        }
        if (getEntityCitizenshipBo(citizenship.getEntityId(), citizenship.getStatus().getCode()) == null) {
            throw new RiceIllegalStateException("the EntityCitizenship to update does not exist: " + citizenship);
        }
    }
    EntityCitizenshipBo bo = EntityCitizenshipBo.from(citizenship);
    return EntityCitizenshipBo.to(businessObjectService.save(bo));
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:18,代碼來源:IdentityServiceImpl.java

示例6: inactivateCitizenship

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public EntityCitizenship inactivateCitizenship(
        String id) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(id, "id");

    EntityCitizenshipBo bo = getEntityCitizenshipBo(id);
    if (bo == null) {
        throw new RiceIllegalStateException("the EntityCitizenship with id: " + id + " does not exist");
    }
    bo.setActive(false);

    return EntityCitizenshipBo.to(dataObjectService.save(bo));
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:14,代碼來源:IdentityServiceImpl.java

示例7: getEntityCitizenshipBo

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
private EntityCitizenshipBo getEntityCitizenshipBo(String entityId, String citizenshipStatusCode) {
    if (StringUtils.isEmpty(entityId) || StringUtils.isEmpty(citizenshipStatusCode)) {
        return null;
    }
    Map<String,Object> criteria = new HashMap<String,Object>(4);
    criteria.put(KIMPropertyConstants.Entity.ENTITY_ID, entityId);
    criteria.put("statusCode", citizenshipStatusCode);
    criteria.put(KIMPropertyConstants.Entity.ACTIVE, Boolean.TRUE);
    return businessObjectService.findByPrimaryKey(EntityCitizenshipBo.class, criteria);
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:11,代碼來源:IdentityServiceImpl.java

示例8: inactivateCitizenship

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public EntityCitizenship inactivateCitizenship(String id) throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(id, "id");

    EntityCitizenshipBo bo = getEntityCitizenshipBo(id);
    if (bo == null) {
        throw new RiceIllegalStateException("the EntityCitizenship with id: " + id + " does not exist");
    }
    bo.setActive(false);
    return EntityCitizenshipBo.to(businessObjectService.save(bo));
}
 
開發者ID:aapotts,項目名稱:kuali_rice,代碼行數:12,代碼來源:IdentityServiceImpl.java

示例9: getCitizenships

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
@Override
public List<EntityCitizenshipBo> getCitizenships() {
    return citizenships;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:5,代碼來源:EntityBo.java

示例10: setCitizenships

import org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo; //導入依賴的package包/類
public void setCitizenships(List<EntityCitizenshipBo> citizenships) {
    this.citizenships = citizenships;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:4,代碼來源:EntityBo.java


注:本文中的org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipBo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。