src/main/java/org/edgegallery/appstore/interfaces/app/facade/dto/AppDto.java
public static AppDto of(App app) {
        AppDto dto = new AppDto();
        dto.appId = app.getAppId();
        dto.name = app.getAppName();
        dto.provider = app.getProvider();
        dto.type = app.getApplicationType();
        dto.shortDesc = app.getShortDesc();
        dto.showType = app.getShowType();
        dto.createTime = app.getCreateTime();
        dto.details = app.getAppIntroduction();
        dto.downloadCount = app.getDownloadCount();
        dto.affinity = app.getAffinity();
        dto.industry = app.getIndustry();
        dto.contact = app.getContact();
        dto.score = app.getScore();
        dto.userId = app.getUser().getUserId();
        dto.userName = app.getUser().getUserName();
        dto.status = app.getStatus();
        dto.deployMode = app.getDeployMode();
        dto.isHotApp = app.isHotApp();
        dto.isFree = app.isFree();
        dto.price = app.getPrice();
        if (app.getReleases() != null) {
            Optional<Release> release = app.findLastRelease();
            if (release.isPresent()) {
                dto.packageId = release.get().getPackageId();
                dto.experienceAble = release.get().isExperienceAble();
            }
        }
        return dto;
    }
/**
     * transfer App to AppDto object..
     *
     * @param app is an App object.
     * @return AppDto
     */
transfer App to AppDto object
@param app is an App object.
transfer App to AppDto object @param app is an App object .
public static AppDto of(App app) {
        AppDto dto = new AppDto();
        dto.appId = app.getAppId();
        dto.name = app.getAppName();
        dto.provider = app.getProvider();
        dto.type = app.getApplicationType();
        dto.shortDesc = app.getShortDesc();
        dto.showType = app.getShowType();
        dto.createTime = app.getCreateTime();
        dto.details = app.getAppIntroduction();
        dto.downloadCount = app.getDownloadCount();
        dto.affinity = app.getAffinity();
        dto.industry = app.getIndustry();
        dto.contact = app.getContact();
        dto.score = app.getScore();
        dto.userId = app.getUser().getUserId();
        dto.userName = app.getUser().getUserName();
        dto.status = app.getStatus();
        dto.deployMode = app.getDeployMode();
        dto.isHotApp = app.isHotApp();
        dto.isFree = app.isFree();
        dto.price = app.getPrice();
        if (app.getReleases() != null) {
            Optional<Release> release = app.findLastRelease();
            if (release.isPresent()) {
                dto.packageId = release.get().getPackageId();
                dto.experienceAble = release.get().isExperienceAble();
            }
        }
        return dto;
    }
public static AppDto of ( App app ) { AppDto dto = new AppDto ( ) ; dto . appId = app . getAppId ( ) ; dto . name = app . getAppName ( ) ; dto . provider = app . getProvider ( ) ; dto . type = app . getApplicationType ( ) ; dto . shortDesc = app . getShortDesc ( ) ; dto . showType = app . getShowType ( ) ; dto . createTime = app . getCreateTime ( ) ; dto . details = app . getAppIntroduction ( ) ; dto . downloadCount = app . getDownloadCount ( ) ; dto . affinity = app . getAffinity ( ) ; dto . industry = app . getIndustry ( ) ; dto . contact = app . getContact ( ) ; dto . score = app . getScore ( ) ; dto . userId = app . getUser ( ) . getUserId ( ) ; dto . userName = app . getUser ( ) . getUserName ( ) ; dto . status = app . getStatus ( ) ; dto . deployMode = app . getDeployMode ( ) ; dto . isHotApp = app . isHotApp ( ) ; dto . isFree = app . isFree ( ) ; dto . price = app . getPrice ( ) ; if ( app . getReleases ( ) != null ) { Optional < Release > release = app . findLastRelease ( ) ; if ( release . isPresent ( ) ) { dto . packageId = release . get ( ) . getPackageId ( ) ; dto . experienceAble = release . get ( ) . isExperienceAble ( ) ; } } return dto ; }
transfer App to AppDto object..
 @param app is an App object.
transfer App to AppDto object .. @param app is an App object .