TellervoEntityAssociatedResource.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:tellervo 作者:
/**
 * Constructor for read or delete
 * 
 * @param entity a tellervo WS entity to perform an operation on
 * @param queryType one of read or delete
 */
public TellervoEntityAssociatedResource(WSIEntity entity, TellervoRequestType queryType) {
    super(entity.getClass().getAnnotation(XmlRootElement.class).name(), 
            queryType);

    if(entity == null)
        throw new NullPointerException("Entity may not be null");

    switch(queryType) {
    case READ:
    case DELETE:
        this.readDeleteOrMergeEntity = entity;
        break;

    default:
        throw new IllegalArgumentException("Invalid request type: must be one of READ or DELETE for this method");
    }       
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号