public String getVersion() { return model.getVersion(); }
public String getVersion() { return model.getVersion(); }
public ArchivaArtifact( ArchivaArtifactModel artifactModel ) { this.model = artifactModel; model.setSnapshot( VersionUtil.isSnapshot( model.getVersion() ) ); this.baseVersion = VersionUtil.getBaseVersion( model.getVersion() ); }
public ArchivaArtifact( ArchivaArtifactModel artifactModel ) { this.model = artifactModel; model.setSnapshot( VersionUtil.isSnapshot( model.getVersion() ) ); this.baseVersion = VersionUtil.getBaseVersion( model.getVersion() ); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); if ( model.getGroupId() != null ) { sb.append( model.getGroupId() ); sb.append( ":" ); } appendArtifactTypeClassifierString( sb ); sb.append( ":" ); if ( model.getVersion() != null ) { sb.append( model.getVersion() ); } return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); if ( model.getGroupId() != null ) { sb.append( model.getGroupId() ); sb.append( ":" ); } appendArtifactTypeClassifierString( sb ); sb.append( ":" ); if ( model.getVersion() != null ) { sb.append( model.getVersion() ); } return sb.toString(); }
buf.append( "\n" ); buf.append( "version = '" ); buf.append( getVersion() ); buf.append( "'" ); buf.append( "\n" );
buf.append( "\n" ); buf.append( "version = '" ); buf.append( getVersion() ); buf.append( "'" ); buf.append( "\n" );
@Override public int hashCode() { int result = 1; if ( model != null ) { result = PRIME * result + ( ( model.getGroupId() == null ) ? 0 : model.getGroupId().hashCode() ); result = PRIME * result + ( ( model.getArtifactId() == null ) ? 0 : model.getArtifactId().hashCode() ); result = PRIME * result + ( ( model.getVersion() == null ) ? 0 : model.getVersion().hashCode() ); result = PRIME * result + ( ( model.getClassifier() == null ) ? 0 : model.getClassifier().hashCode() ); result = PRIME * result + ( ( model.getType() == null ) ? 0 : model.getType().hashCode() ); } return result; }
@Override public int hashCode() { int result = 1; if ( model != null ) { result = PRIME * result + ( ( model.getGroupId() == null ) ? 0 : model.getGroupId().hashCode() ); result = PRIME * result + ( ( model.getArtifactId() == null ) ? 0 : model.getArtifactId().hashCode() ); result = PRIME * result + ( ( model.getVersion() == null ) ? 0 : model.getVersion().hashCode() ); result = PRIME * result + ( ( model.getClassifier() == null ) ? 0 : model.getClassifier().hashCode() ); result = PRIME * result + ( ( model.getType() == null ) ? 0 : model.getType().hashCode() ); } return result; }
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof ArchivaArtifactModel ) ) { return false; } ArchivaArtifactModel that = (ArchivaArtifactModel) other; boolean result = true; result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) ); result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); result = result && ( getClassifier() == null ? that.getClassifier() == null : getClassifier().equals( that.getClassifier() ) ); result = result && ( getType() == null ? that.getType() == null : getType().equals( that.getType() ) ); result = result && ( getRepositoryId() == null ? that.getRepositoryId() == null : getRepositoryId().equals( that.getRepositoryId() ) ); return result; } //-- boolean equals( Object )
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof ArchivaArtifactModel ) ) { return false; } ArchivaArtifactModel that = (ArchivaArtifactModel) other; boolean result = true; result = result && ( getGroupId() == null ? that.getGroupId() == null : getGroupId().equals( that.getGroupId() ) ); result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); result = result && ( getClassifier() == null ? that.getClassifier() == null : getClassifier().equals( that.getClassifier() ) ); result = result && ( getType() == null ? that.getType() == null : getType().equals( that.getType() ) ); result = result && ( getRepositoryId() == null ? that.getRepositoryId() == null : getRepositoryId().equals( that.getRepositoryId() ) ); return result; } //-- boolean equals( Object )