public Artifact()
{
-
- }
-
- @Override
- public boolean equals( Object o )
- {
- if ( this == o )
- {
- return true;
- }
- if ( o == null || getClass() != o.getClass() )
- {
- return false;
- }
-
- Artifact artifact = (Artifact) o;
-
- if ( !artifactId.equals( artifact.artifactId ) )
- {
- return false;
- }
- if ( !groupId.equals( artifact.groupId ) )
- {
- return false;
- }
- if ( !repositoryId.equals( artifact.repositoryId ) )
- {
- return false;
- }
- if ( type != null ? !type.equals( artifact.type ) : artifact.type != null )
- {
- return false;
- }
- if ( !version.equals( artifact.version ) )
- {
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result = repositoryId.hashCode();
- result = 31 * result + groupId.hashCode();
- result = 31 * result + artifactId.hashCode();
- result = 31 * result + version.hashCode();
- result = 31 * result + ( type != null ? type.hashCode() : 0 );
- return result;
- }
-
- @Override
- public String toString()
- {
- return "Artifact{" + "repositoryId='" + repositoryId + '\'' + ", groupId='" + groupId + '\'' + ", artifactId='"
- + artifactId + '\'' + ", version='" + version + '\'' + ", type='" + type + '\'' + '}';
+ // no op
}
public Artifact( String repositoryId, String groupId, String artifactId, String version, String type )
-// String type, Date whenGathered )
{
this.repositoryId = repositoryId;
this.groupId = groupId;
this.artifactId = artifactId;
this.version = version;
this.type = type;
- //this.whenGathered = whenGathered;
}
public String getGroupId()
return repositoryId;
}
- /*public Date getWhenGathered()
- {
- return whenGathered;
- }*/
-
public void setGroupId( String groupId )
{
this.groupId = groupId;
this.repositoryId = repositoryId;
}
- /*@ServiceBeanField( "whenGathered" )
- public void setWhenGathered( Date whenGathered )
+ @Override
+ public boolean equals( Object o )
{
- this.whenGathered = whenGathered;
- }*/
+ if ( this == o )
+ {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() )
+ {
+ return false;
+ }
+
+ Artifact artifact = (Artifact) o;
+
+ if ( !artifactId.equals( artifact.artifactId ) )
+ {
+ return false;
+ }
+ if ( !groupId.equals( artifact.groupId ) )
+ {
+ return false;
+ }
+ if ( !repositoryId.equals( artifact.repositoryId ) )
+ {
+ return false;
+ }
+ if ( type != null ? !type.equals( artifact.type ) : artifact.type != null )
+ {
+ return false;
+ }
+ if ( !version.equals( artifact.version ) )
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ int result = repositoryId.hashCode();
+ result = 31 * result + groupId.hashCode();
+ result = 31 * result + artifactId.hashCode();
+ result = 31 * result + version.hashCode();
+ result = 31 * result + ( type != null ? type.hashCode() : 0 );
+ return result;
+ }
+
+ @Override
+ public String toString()
+ {
+ final StringBuilder sb = new StringBuilder();
+ sb.append( "Artifact" );
+ sb.append( "{repositoryId='" ).append( repositoryId ).append( '\'' );
+ sb.append( ", groupId='" ).append( groupId ).append( '\'' );
+ sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
+ sb.append( ", version='" ).append( version ).append( '\'' );
+ sb.append( ", type='" ).append( type ).append( '\'' );
+ sb.append( '}' );
+ return sb.toString();
+ }
+
}