Examples of SettingKey


Examples of org.exist.config.annotation.ConfigurationFieldSettings.SettingKey

                } else if (int.class == fieldType || Integer.class == fieldType) {
                    //int or Integer

                    if (field.isAnnotationPresent(ConfigurationFieldSettings.class)) {
                        final String settings = field.getAnnotation(ConfigurationFieldSettings.class).value();
                        final SettingKey settingKey = SettingKey.forSettings(settings);

                        try {
                            if (settingKey == SettingKey.RADIX) {
                                final int radix = Integer.valueOf(settingKey.extractValueFromSettings(settings));
                                value = Integer.valueOf(configuration.getProperty(property), radix);
                            } else if (settingKey == SettingKey.OCTAL_STRING) {
                                value = Integer.valueOf(configuration.getProperty(property), 8);
                            } else {
                                value = Integer.valueOf(configuration.getProperty(property));
View Full Code Here

Examples of org.exist.config.annotation.ConfigurationFieldSettings.SettingKey

           
        } else if (int.class == fieldType || Integer.class == fieldType) {
           
            if (field.isAnnotationPresent(ConfigurationFieldSettings.class)) {
                final String settings = field.getAnnotation(ConfigurationFieldSettings.class).value();
                final SettingKey settingKey = SettingKey.forSettings(settings);

                if (settingKey == SettingKey.RADIX) {
                    try {
                        final int radix = Integer.valueOf(settingKey.extractValueFromSettings(settings));
                        return Integer.toString((Integer) field.get(instance), radix);
                    } catch (final Exception e) {
                        //UNDERSTAND: ignore, set back to default or throw error?
                    }
                   
View Full Code Here

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

Examples of org.openqreg.bean.SettingKey

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

Examples of org.openqreg.bean.SettingKey

    }
    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
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.