me.iste.subsonicdialer.model.License.java Source code

Java tutorial

Introduction

Here is the source code for me.iste.subsonicdialer.model.License.java

Source

/**
 * 
 */
package me.iste.subsonicdialer.model;

import java.io.IOException;
import java.text.ParseException;
import java.util.Date;

import me.iste.subsonicdialer.Loader;
import me.iste.subsonicdialer.exception.SubsonicException;

import org.jdom2.JDOMException;

/**
 * @author Iste
 * @version 1.2 9 mai 2012
 * 
 */
public class License extends Element {

    private Boolean valid;
    private String email;
    private String key;
    private Date date;

    /**
     * @param loader
     */
    public License(final Loader loader) {
        super(loader);
    }

    /**
     * @param loader
     * @param valid
     * @param email
     * @param key
     * @param date
     */
    public License(final Loader loader, final Boolean valid, final String email, final String key,
            final Date date) {
        super(loader);
        this.valid = valid;
        this.email = email;
        this.key = key;
        this.date = date;
    }

    /*
     * (non-Javadoc)
     * 
     * @see me.iste.subsonicdialer.model.Element#reload()
     */
    @Override
    public void reload() throws JDOMException, IOException, ParseException, SubsonicException {
        getLoader().reload(this);
    }

    /**
     * @return the valid
     */
    public boolean isValid() {
        return this.valid;
    }

    /**
     * @param valid the valid to set
     */
    public void setValid(final Boolean valid) {
        this.valid = valid;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return this.email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(final String email) {
        this.email = email;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return this.key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(final String key) {
        this.key = key;
    }

    /**
     * @return the date
     */
    public Date getDate() {
        return this.date;
    }

    /**
     * @param date the date to set
     */
    public void setDate(final Date date) {
        this.date = date;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "License [valid=" + this.valid + ", email=" + this.email + ", key=" + this.key + ", date="
                + this.date + "]";
    }

}