Package org.onebusaway.users.model

Examples of org.onebusaway.users.model.UserProperties


    return getServiceForVersion(maxVersion);
  }

  private int getPropertiesVersion(User user) {
    UserProperties props = user.getProperties();
    if (props instanceof UserPropertiesV1)
      return 1;
    if (props instanceof UserPropertiesV2)
      return 2;

    _log.warn("unknown user properties version: " + props.getClass());
    return 0;
  }
View Full Code Here


        for (int userId : userIds) {
          User user = _dao.getUserForId(userId);
          _log.info("processing user: id=" + user.getId());
          if (_propertiesMigration.needsMigration(user.getProperties(), _target)) {
            _log.info("migrating user: id=" + user.getId());
            UserProperties properties = _propertiesMigration.migrate(
                user.getProperties(), _target);
            user.setProperties(properties);
            _dao.saveOrUpdateUser(user);
            usersConverted++;
          }
View Full Code Here

  /****
   * Private Methods
   ****/

  private UserPropertiesV2 getProperties(User user) {
    UserProperties props = user.getProperties();
    UserPropertiesV2 v2 = _userPropertiesMigration.migrate(props,
        UserPropertiesV2.class);
    if (props != v2)
      user.setProperties(v2);
    return v2;
View Full Code Here

TOP

Related Classes of org.onebusaway.users.model.UserProperties

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.