forked from project-ncl/pnc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unique constraint on artifact.originurl
to allow per-build target repositories for generic http downloads..
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,14 +43,14 @@ | |
|
||
/** | ||
* Created by <a href="mailto:[email protected]">Matej Lazar</a> on 2014-11-23. | ||
* | ||
* | ||
* Class that maps the artifacts created and/or used by the builds of the projects. | ||
* The "type" indicates the genesis of the artifact, whether it has been imported from | ||
* The "type" indicates the genesis of the artifact, whether it has been imported from | ||
* external repositories, or built internally. | ||
* | ||
* | ||
* The repoType indicated the type of repository which is used to distributed the artifact. | ||
* The repoType repo indicates the format for the identifier field. | ||
* | ||
* | ||
*/ | ||
@Entity | ||
@Table( | ||
|
@@ -144,7 +144,7 @@ public class Artifact implements GenericEntity<Integer> { | |
* The location from which this artifact was originally downloaded for import | ||
*/ | ||
@Size(max=500) | ||
@Column(unique=true, updatable=false, length=500) | ||
@Column(unique=false, updatable=false, length=500) | ||
private String originUrl; | ||
|
||
/** | ||
|
@@ -230,6 +230,7 @@ public void preRemove() { | |
* | ||
* @return the id | ||
*/ | ||
@Override | ||
public Integer getId() { | ||
return id; | ||
} | ||
|
@@ -246,7 +247,7 @@ public void setId(Integer id) { | |
|
||
/** | ||
* Gets the identifier. | ||
* | ||
* | ||
* The identifier should contain different logic depending on the artifact type: i.e Maven should contain the GAV, NPM and | ||
* CocoaPOD should be identified differently | ||
* | ||
|
@@ -379,7 +380,7 @@ public void setBuildRecords(Set<BuildRecord> buildRecords) { | |
* Add a build record which produced this artifact | ||
* | ||
* @param buildRecord the new project build record | ||
* @return | ||
* @return | ||
*/ | ||
public boolean addBuildRecord(BuildRecord buildRecord) { | ||
return this.buildRecords.add(buildRecord); | ||
|
@@ -652,15 +653,18 @@ public String getIdentifier() { | |
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
if (this == o) { | ||
return true; | ||
if (!(o instanceof IdentifierSha256)) | ||
} | ||
if (!(o instanceof IdentifierSha256)) { | ||
return false; | ||
} | ||
|
||
IdentifierSha256 that = (IdentifierSha256) o; | ||
|
||
if (!identifier.equals(that.identifier)) | ||
if (!identifier.equals(that.identifier)) { | ||
return false; | ||
} | ||
return sha256.equals(that.sha256); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters