コード例 #1
0
 public void restartUserId() {
   try {
     if (usersList != null && !usersList.isEmpty()) {
       clearUsers();
       userID = null;
     } else super.restartUserId();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
コード例 #2
0
 @SuppressWarnings("unchecked")
 public void configDataSource(XMLConfiguration config, String section, String dataSourceName) {
   super.configDataSource(config, section, dataSourceName);
   Configuration dsConf = config.configurationAt(section);
   imdb.configDataSource(config, section + ".IMDb");
   if (dsConf.containsKey("users")) {
     usersList = dsConf.getList("users");
   }
   usersToLoad = Utils.getIntFromConfIfNotNull(dsConf, "usersToLoad", usersToLoad);
 }
コード例 #3
0
 public void setAttributes(Attribute[] attrs) {
   for (int i = 0; i < attrs.length; i++) {
     if (attrs[i].name().endsWith(".csv")) {
       Attribute[] attrs2 = new Attribute[attrs.length - 1];
       for (int j = 0; j < i; j++) {
         attrs2[j] = attrs[j];
       }
       for (int j = i; j < attrs2.length; j++) {
         attrs2[j] = attrs[j + 1];
       }
       attrs = attrs2;
       i = -1;
     }
   }
   super.setAttributes(attrs);
   allAttributes = null;
 }