public Artifact getArtifact(final DbArtifact dbArtifact) {
        final Artifact artifact = DataModelFactory.createArtifact(dbArtifact.getGroupId(), dbArtifact.getArtifactId(),
            dbArtifact.getVersion(), dbArtifact.getClassifier(), dbArtifact.getType(), dbArtifact.getExtension());

        artifact.setSha256(dbArtifact.getSha256());
        artifact.setDescription(dbArtifact.getDescription());
        artifact.setPromoted(dbArtifact.isPromoted());
        artifact.setSize(dbArtifact.getSize());
        artifact.setDownloadUrl(dbArtifact.getDownloadUrl());
        artifact.setProvider(dbArtifact.getProvider());
        artifact.setOrigin(dbArtifact.getOrigin());
        artifact.setCreatedDateTime(dbArtifact.getCreatedDateTime());
        artifact.setUpdatedDateTime(dbArtifact.getUpdatedDateTime());

        for (final String licenseId : dbArtifact.getLicenses()) {
            artifact.addLicense(licenseId);
        }

        return artifact;
    }
public Artifact getArtifact ( final DbArtifact dbArtifact ) { final Artifact artifact = DataModelFactory . createArtifact ( dbArtifact . getGroupId ( ) , dbArtifact . getArtifactId ( ) , dbArtifact . getVersion ( ) , dbArtifact . getClassifier ( ) , dbArtifact . getType ( ) , dbArtifact . getExtension ( ) ) ; artifact . setSha256 ( dbArtifact . getSha256 ( ) ) ; artifact . setDescription ( dbArtifact . getDescription ( ) ) ; artifact . setPromoted ( dbArtifact . isPromoted ( ) ) ; artifact . setSize ( dbArtifact . getSize ( ) ) ; artifact . setDownloadUrl ( dbArtifact . getDownloadUrl ( ) ) ; artifact . setProvider ( dbArtifact . getProvider ( ) ) ; artifact . setOrigin ( dbArtifact . getOrigin ( ) ) ; artifact . setCreatedDateTime ( dbArtifact . getCreatedDateTime ( ) ) ; artifact . setUpdatedDateTime ( dbArtifact . getUpdatedDateTime ( ) ) ; for ( final String licenseId : dbArtifact . getLicenses ( ) ) { artifact . addLicense ( licenseId ) ; } return artifact ; }
Transform an artifact from database model to client/server model

@param dbArtifact the artifact to transform
@return Artifact return a license in database model