All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.archiva.redback.role.model.ModelPermission Maven / Gradle / Ivy

There is a newer version: 2.6.2
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.7,
// any modifications will be overwritten.
// ==============================================================

package org.apache.archiva.redback.role.model;

/**
 * Class ModelPermission.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ModelPermission
    implements java.io.Serializable
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field id.
     */
    private String id;

    /**
     * Field name.
     */
    private String name;

    /**
     * Field description.
     */
    private String description;

    /**
     * 
     *             this permission should persist even if referring
     * roles are
     *             removed
     *           .
     */
    private boolean permanent = false;

    /**
     * 
     *             the id of the operation for this permission
     *           .
     */
    private String operation;

    /**
     * 
     *             the id of the resource for this permission, can
     * accept
     *             ${resource} for templates
     *           .
     */
    private String resource;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method equals.
     * 
     * @param other
     * @return boolean
     */
    public boolean equals( Object other )
    {
        if ( this == other )
        {
            return true;
        }

        if ( !( other instanceof ModelPermission ) )
        {
            return false;
        }

        ModelPermission that = (ModelPermission) other;
        boolean result = true;

        result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );

        return result;
    } //-- boolean equals( Object )

    /**
     * Get the description field.
     * 
     * @return String
     */
    public String getDescription()
    {
        return this.description;
    } //-- String getDescription()

    /**
     * Get the id field.
     * 
     * @return String
     */
    public String getId()
    {
        return this.id;
    } //-- String getId()

    /**
     * Get the name field.
     * 
     * @return String
     */
    public String getName()
    {
        return this.name;
    } //-- String getName()

    /**
     * Get the id of the operation for this permission.
     * 
     * @return String
     */
    public String getOperation()
    {
        return this.operation;
    } //-- String getOperation()

    /**
     * Get the id of the resource for this permission, can accept
     *             ${resource} for templates.
     * 
     * @return String
     */
    public String getResource()
    {
        return this.resource;
    } //-- String getResource()

    /**
     * Method hashCode.
     * 
     * @return int
     */
    public int hashCode()
    {
        int result = 17;

        result = 37 * result + ( id != null ? id.hashCode() : 0 );

        return result;
    } //-- int hashCode()

    /**
     * Get this permission should persist even if referring roles
     * are
     *             removed.
     * 
     * @return boolean
     */
    public boolean isPermanent()
    {
        return this.permanent;
    } //-- boolean isPermanent()

    /**
     * Set the description field.
     * 
     * @param description
     */
    public void setDescription( String description )
    {
        this.description = description;
    } //-- void setDescription( String )

    /**
     * Set the id field.
     * 
     * @param id
     */
    public void setId( String id )
    {
        this.id = id;
    } //-- void setId( String )

    /**
     * Set the name field.
     * 
     * @param name
     */
    public void setName( String name )
    {
        this.name = name;
    } //-- void setName( String )

    /**
     * Set the id of the operation for this permission.
     * 
     * @param operation
     */
    public void setOperation( String operation )
    {
        this.operation = operation;
    } //-- void setOperation( String )

    /**
     * Set this permission should persist even if referring roles
     * are
     *             removed.
     * 
     * @param permanent
     */
    public void setPermanent( boolean permanent )
    {
        this.permanent = permanent;
    } //-- void setPermanent( boolean )

    /**
     * Set the id of the resource for this permission, can accept
     *             ${resource} for templates.
     * 
     * @param resource
     */
    public void setResource( String resource )
    {
        this.resource = resource;
    } //-- void setResource( String )

    /**
     * Method toString.
     * 
     * @return String
     */
    public java.lang.String toString()
    {
        StringBuilder buf = new StringBuilder( 128 );

        buf.append( "id = '" );
        buf.append( getId() );
        buf.append( "'" );

        return buf.toString();
    } //-- java.lang.String toString()

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy