⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 financialaccountdtoassembler.java

📁 EJB+Struts+Webservice实现的开放式基金管理系统
💻 JAVA
字号:
package com.fund.client;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Collection;
import java.util.List;

/**
 *
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class FinancialAccountDtoAssembler {
        /**
         *
         * @param financialAccount FinancialAccount
         * @return FinancialAccountDto
         */
        public static FinancialAccountDto createDto(FinancialAccount
        financialAccount) {
        FinancialAccountDto financialAccountDto = new FinancialAccountDto();
        if (financialAccount != null) {
            financialAccountDto.setAccountNo(financialAccount.getAccountNo());
            financialAccountDto.setClientNo(financialAccount.getClientNo());
            financialAccountDto.setFinancingAmount(financialAccount.
                    getFinancingAmount());
            financialAccountDto
                    .setCreatedDate(financialAccount.getCreatedDate());
            financialAccountDto.setStatus(financialAccount.getStatus());
            financialAccountDto.setPassword(financialAccount.getPassword());
        }
        return financialAccountDto;
    }

    /**
     *
     * @param financialAccounts Collection
     * @return FinancialAccountDto[]
     */
    public static FinancialAccountDto[] createDtos(
            Collection financialAccounts) {
        List list = new ArrayList();
        if (financialAccounts != null) {
            Iterator iterator = financialAccounts.iterator();
            while (iterator.hasNext()) {
                list.add(createDto((FinancialAccount) iterator.next()));
            }
        }
        FinancialAccountDto[] returnArray
                = new FinancialAccountDto[list.size()];
        return (FinancialAccountDto[]) list.toArray(returnArray);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -