Package org.openqreg.bean

Examples of org.openqreg.bean.SettingKey


*/
public static Object findByPrimaryKey(Connection con, PrimaryKey key) throws SQLException {
PreparedStatement pStmt = null;
ResultSet rs = null;
SettingBean valueObject = null;
SettingKey primaryKey = (SettingKey) key;
try{
pStmt = con.prepareStatement(SettingBeanBase.SELECT_STATEMENT);
pStmt.setObject(1, primaryKey.getId());
rs = pStmt.executeQuery();
while (rs.next()){
valueObject = populate(rs);
valueObject.afterPopulate(con);
}
View Full Code Here


/**
* @return The primaryKey
*
*/
public PrimaryKey getPrimaryKey() {
return new SettingKey(getId());
}
View Full Code Here

    }
    try {
      SettingBean setBean = null;
      // sets the loginwaittimeout to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "DISPATCHER_LOGINWAITTIMEOUT"));
      this.setLoginWaitTimeOut(new Integer(setBean.getSetting())
          .intValue());

      // sets the maxloginwait to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey("DISPATCHER_MAXLOGINWAIT"));
      this.setMaxLoginWait(new Integer(setBean.getSetting()).intValue());

      // sets the maxinactivetime to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "DISPATCHER_MAXINACTIVETIME"));
      this.setMaxInactiveTime(new Integer(setBean.getSetting())
          .intValue());

      // sets the maxinactivetimebeforeremoval to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "DISPATCHER_MAXINACTIVETIMEBEFOREREMOVAL"));
      this.setMaxInactiveTimeBeforeRemoval(new Integer(setBean
          .getSetting()).intValue());

      // sets the shutdowntime to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey("DISPATCHER_SHUTDOWNTIME"));
      GregorianCalendar GC = new GregorianCalendar();
      if (setBean.getSetting() != null) {
        GC.setTimeInMillis(new Long(setBean.getSetting()).longValue());
        this.setShutDownTime(GC);
      } else {
        this.setShutDownTime(null);
      }

      // sets the SHOWSHUTDOWNMESSAGETIME to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "DISPATCHER_SHOWSHUTDOWNMESSAGETIME"));
      this.setShowShutDownMessageTime(new Integer(setBean.getSetting())
          .intValue());

      // sets the DEFAULTLANGUAGE to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "DISPATCHER_DEFAULTLANGUAGE"));
      this.setDefaultLanguage(setBean.getSetting());

      // sets the PASSWORDLIFELENGTH to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "DISPATCHER_PASSWORDLIFELENGTH"));
      this.setPasswordLifeLength(new Integer(setBean.getSetting())
          .intValue());

      // sets the PATIENTLOG_LOG_PATIENTLISTS to the one in the database
      setBean = (SettingBean) SettingFinderBase
          .findByPrimaryKey(new SettingKey(
              "PATIENTLOG_LOG_PATIENTLISTS"));
      this.setPatientlogLogPatientlists(new Boolean(setBean.getSetting())
          .booleanValue());

    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.openqreg.bean.SettingKey

Copyright © 2018 www.massapicom. 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.