001    // =================== DO NOT EDIT THIS FILE ====================
002    // Generated by Modello 1.7,
003    // any modifications will be overwritten.
004    // ==============================================================
005    
006    package org.apache.archiva.configuration;
007    
008    /**
009     * The FileType object.
010     * 
011     * @version $Revision$ $Date$
012     */
013    @SuppressWarnings( "all" )
014    public class FileType
015        implements java.io.Serializable
016    {
017    
018          //--------------------------/
019         //- Class/Member Variables -/
020        //--------------------------/
021    
022        /**
023         * Field id.
024         */
025        private String id;
026    
027        /**
028         * Field patterns.
029         */
030        private java.util.List<String> patterns;
031    
032    
033          //-----------/
034         //- Methods -/
035        //-----------/
036    
037        /**
038         * Method addPattern.
039         * 
040         * @param string
041         */
042        public void addPattern( String string )
043        {
044            getPatterns().add( string );
045        } //-- void addPattern( String )
046    
047        /**
048         * Get the id field.
049         * 
050         * @return String
051         */
052        public String getId()
053        {
054            return this.id;
055        } //-- String getId()
056    
057        /**
058         * Method getPatterns.
059         * 
060         * @return List
061         */
062        public java.util.List<String> getPatterns()
063        {
064            if ( this.patterns == null )
065            {
066                this.patterns = new java.util.ArrayList<String>();
067            }
068    
069            return this.patterns;
070        } //-- java.util.List<String> getPatterns()
071    
072        /**
073         * Method removePattern.
074         * 
075         * @param string
076         */
077        public void removePattern( String string )
078        {
079            getPatterns().remove( string );
080        } //-- void removePattern( String )
081    
082        /**
083         * Set the id field.
084         * 
085         * @param id
086         */
087        public void setId( String id )
088        {
089            this.id = id;
090        } //-- void setId( String )
091    
092        /**
093         * Set the patterns field.
094         * 
095         * @param patterns
096         */
097        public void setPatterns( java.util.List<String> patterns )
098        {
099            this.patterns = patterns;
100        } //-- void setPatterns( java.util.List )
101    
102        
103    
104                @Override
105                public boolean equals( Object o )
106                {
107                    if ( this == o )
108                    {
109                        return true;
110                    }
111                    if ( o == null || getClass() != o.getClass() )
112                    {
113                        return false;
114                    }
115    
116                    FileType fileType = (FileType) o;
117    
118                    if ( id != null ? !id.equals( fileType.id ) : fileType.id != null )
119                    {
120                        return false;
121                    }
122    
123                    return true;
124                }
125    
126                @Override
127                public int hashCode()
128                {
129                    return id != null ? 37 + id.hashCode() : 0;
130                }
131              
132    }