package org.ajax4jsf.bean.tree.swing;

import org.richfaces.model.SwingTreeNodeImpl;

public class Performer extends SwingTreeNodeImpl {

    private String name;

    /**
     * Gets value of library field.
     * @return value of library field
     */
    public AudioLibrary getLibrary() {
        return (AudioLibrary) getParent();
    }

    /**
     * Set a new value for library field.
     * @param library a new value for library field
     */
    public void setLibrary(AudioLibrary library) {
        setParent(library);
    }

    /**
     * Gets value of name field.
     * @return value of name field
     */
    public String getName() {
        return name;
    }

    /**
     * Set a new value for name field.
     * @param name a new value for name field
     */
    public void setName(String name) {
        this.name = name;
    }

    public void addAlbum(Album album) {
        addChild(album);
        album.setParent(this);
    }

    public String getType() {
        return "performer";
    }
}
