ch.eitchnet.android.mabea.model.Setting.java Source code

Java tutorial

Introduction

Here is the source code for ch.eitchnet.android.mabea.model.Setting.java

Source

/*
 * Copyright (c) 2012, Robert von Burg
 *
 * All rights reserved.
 *
 * This file is part of the XXX.
 *
 *  XXX is free software: you can redistribute 
 *  it and/or modify it under the terms of the GNU General Public License as 
 *  published by the Free Software Foundation, either version 3 of the License, 
 *  or (at your option) any later version.
 *
 *  XXX is distributed in the hope that it will 
 *  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with XXX.  If not, see 
 *  <http://www.gnu.org/licenses/>.
 */
package ch.eitchnet.android.mabea.model;

import org.joda.time.Duration;
import org.joda.time.Hours;
import org.joda.time.Minutes;

/**
 * @author Robert von Burg <eitch@eitchnet.ch>
 * 
 */
public class Setting {

    private int id;
    private String name;
    private String url;
    private String username;
    private boolean persisted;
    private Duration requiredWorkPerDay;

    /**
     * Default constructor
     */
    public Setting() {
        requiredWorkPerDay = Hours.EIGHT.toStandardDuration().plus(Minutes.minutes(30).toStandardDuration());
    }

    /**
     * @return the id
     */
    public int getId() {
        return this.id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

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

    /**
     * @param name
     *            the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the url
     */
    public String getUrl() {
        return this.url;
    }

    /**
     * @param url
     *            the url to set
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * @return the username
     */
    public String getUsername() {
        return this.username;
    }

    /**
     * @param username
     *            the username to set
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * @param persisted
     *            the persisted to set
     */
    public void setPersisted(boolean persisted) {
        this.persisted = persisted;
    }

    /**
     * @return the persisted
     */
    public boolean isPersisted() {
        return this.persisted;
    }

    /**
     * @return the requiredWorkPerDay
     */
    public Duration getRequiredWorkPerDay() {
        return this.requiredWorkPerDay;
    }

    /**
     * @param requiredWorkPerDay
     *            the requiredWorkPerDay to set
     */
    public void setRequiredWorkPerDay(Duration requiredWorkPerDay) {
        this.requiredWorkPerDay = requiredWorkPerDay;
    }
}