Package com.ronald.gantengtimesheet.config

Source Code of com.ronald.gantengtimesheet.config.Config

package com.ronald.gantengtimesheet.config;

import com.ronald.gantengtimesheet.db.ConfigEntity;
import com.ronald.gantengtimesheet.db.ConfigEntityCollection;

public class Config {
  private Config() {}
  public static Integer getDefaultReportDuration() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.DEFAULT_REPORT_DURATION.name);
    assert ce.getDataType().equals(Integer.class.getName());
    return Integer.valueOf(ce.getValue());
  }
  public static String getFrom() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.FROM.name);
    return ce.getValue();
  }
  public static String getTo() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.TO.name);
    return ce.getValue();
  }
  public static Double getDefaultRate() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.DEFAULT_RATE.name);
    assert ce.getDataType().equals(Double.class.getName());
    return Double.valueOf(ce.getValue());
  }
  public static String getLastDirectory() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.LAST_DIRECTORY.name);
    return ce.getValue();
  }
  public static String getNotes() {
    ConfigEntity ce = ConfigEntityCollection.getInstance().getConfigEntity(ConfigEntityCollection.Config.NOTES.name);
    return ce.getValue();
  }
}
TOP

Related Classes of com.ronald.gantengtimesheet.config.Config

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.