code: public DbArtifact getDbArtifact(final Artifact artifact) {
          final DbArtifact dbArtifact = new DbArtifact();
          dbArtifact.setGroupId(artifact.getGroupId());
          dbArtifact.setArtifactId(artifact.getArtifactId());
          dbArtifact.setVersion(artifact.getVersion());
          dbArtifact.setClassifier(artifact.getClassifier());
          dbArtifact.setType(artifact.getType());
          dbArtifact.setExtension(artifact.getExtension());
          dbArtifact.setOrigin(artifact.getOrigin());
          dbArtifact.setPromoted(artifact.isPromoted());
          dbArtifact.setLicenses(artifact.getLicenses());
  
          dbArtifact.setSize(artifact.getSize());
          dbArtifact.setSha256(artifact.getSha256());
          dbArtifact.setDescription(artifact.getDescription());
          dbArtifact.setDownloadUrl(artifact.getDownloadUrl());
          dbArtifact.setProvider(artifact.getProvider());
          dbArtifact.setCreatedDateTime(artifact.getCreatedDateTime());
          dbArtifact.setUpdatedDateTime(artifact.getUpdatedDateTime());
  
          return dbArtifact;
      }
docs: Transform an artifact from client/server model to database model
  
  WARNING: This transformation does not take licenses into account!!!
  
  @param artifact the artifact to transform
  @return DbArtifact