コード例 #1
0
  @Override
  public Object clone() {
    AccountImpl accountImpl = new AccountImpl();

    accountImpl.setAccountId(getAccountId());
    accountImpl.setCompanyId(getCompanyId());
    accountImpl.setUserId(getUserId());
    accountImpl.setUserName(getUserName());
    accountImpl.setCreateDate(getCreateDate());
    accountImpl.setModifiedDate(getModifiedDate());
    accountImpl.setParentAccountId(getParentAccountId());
    accountImpl.setName(getName());
    accountImpl.setLegalName(getLegalName());
    accountImpl.setLegalId(getLegalId());
    accountImpl.setLegalType(getLegalType());
    accountImpl.setSicCode(getSicCode());
    accountImpl.setTickerSymbol(getTickerSymbol());
    accountImpl.setIndustry(getIndustry());
    accountImpl.setType(getType());
    accountImpl.setSize(getSize());

    accountImpl.resetOriginalValues();

    return accountImpl;
  }
コード例 #2
0
  @Override
  public Account toEntityModel() {
    AccountImpl accountImpl = new AccountImpl();

    accountImpl.setMvccVersion(mvccVersion);
    accountImpl.setAccountId(accountId);
    accountImpl.setCompanyId(companyId);
    accountImpl.setUserId(userId);

    if (userName == null) {
      accountImpl.setUserName(StringPool.BLANK);
    } else {
      accountImpl.setUserName(userName);
    }

    if (createDate == Long.MIN_VALUE) {
      accountImpl.setCreateDate(null);
    } else {
      accountImpl.setCreateDate(new Date(createDate));
    }

    if (modifiedDate == Long.MIN_VALUE) {
      accountImpl.setModifiedDate(null);
    } else {
      accountImpl.setModifiedDate(new Date(modifiedDate));
    }

    accountImpl.setParentAccountId(parentAccountId);

    if (name == null) {
      accountImpl.setName(StringPool.BLANK);
    } else {
      accountImpl.setName(name);
    }

    if (legalName == null) {
      accountImpl.setLegalName(StringPool.BLANK);
    } else {
      accountImpl.setLegalName(legalName);
    }

    if (legalId == null) {
      accountImpl.setLegalId(StringPool.BLANK);
    } else {
      accountImpl.setLegalId(legalId);
    }

    if (legalType == null) {
      accountImpl.setLegalType(StringPool.BLANK);
    } else {
      accountImpl.setLegalType(legalType);
    }

    if (sicCode == null) {
      accountImpl.setSicCode(StringPool.BLANK);
    } else {
      accountImpl.setSicCode(sicCode);
    }

    if (tickerSymbol == null) {
      accountImpl.setTickerSymbol(StringPool.BLANK);
    } else {
      accountImpl.setTickerSymbol(tickerSymbol);
    }

    if (industry == null) {
      accountImpl.setIndustry(StringPool.BLANK);
    } else {
      accountImpl.setIndustry(industry);
    }

    if (type == null) {
      accountImpl.setType(StringPool.BLANK);
    } else {
      accountImpl.setType(type);
    }

    if (size == null) {
      accountImpl.setSize(StringPool.BLANK);
    } else {
      accountImpl.setSize(size);
    }

    accountImpl.resetOriginalValues();

    return accountImpl;
  }