private User userFromResultSet ( final ResultSet rs ) throws SQLException { String niceName = Strings . nullToEmpty ( rs . getString ( 3 ) ) . trim ( ) ; String displayName = Strings . nullToEmpty ( rs . getString ( 4 ) ) . trim ( ) ; String useDisplayName = displayName . isEmpty ( ) ? niceName : displayName ; return new User ( rs . getLong ( 1 ) , rs . getString ( 2 ) , useDisplayName , niceName , rs . getString ( 5 ) , rs . getTimestamp ( 6 ) . getTime ( ) , rs . getString ( 7 ) , ImmutableList . of ( ) ) ; }
Creates a user from a result set .