/** * copy constructor * * @param copyFrom */ public UserInfo( IUser copyFrom ) { this.id = copyFrom.getObjectId(); this.login = copyFrom.getLogin(); this.password = copyFrom.getPassword(); this.username = copyFrom.getUsername(); this.description = copyFrom.getDescription(); this.enabled = copyFrom.isEnabled(); this.admin = copyFrom.isAdmin(); }
public RowMetaAndData fillTableRow( IUser userInfo ) { RowMetaAndData r = new RowMetaAndData(); r.addValue( new ValueMetaInteger( "ID_USER" ), userInfo.getObjectId() ); r.addValue( new ValueMetaString( "LOGIN" ), userInfo.getLogin() ); r.addValue( new ValueMetaString( "PASSWORD" ), Encr.encryptPassword( userInfo .getPassword() ) ); r.addValue( new ValueMetaString( "NAME" ), userInfo.getUsername() ); r.addValue( new ValueMetaString( "DESCRIPTION" ), userInfo.getDescription() ); r.addValue( new ValueMetaBoolean( "ENABLED" ), Boolean.valueOf( userInfo.isEnabled() ) ); return r; }