private void writeUser(User user, Node node) throws Exception
   {
      node.setProperty(UserProperties.JOS_EMAIL, user.getEmail());
      node.setProperty(UserProperties.JOS_FIRST_NAME, user.getFirstName());
      node.setProperty(UserProperties.JOS_LAST_NAME, user.getLastName());
      node.setProperty(UserProperties.JOS_PASSWORD, user.getPassword());
      node.setProperty(UserProperties.JOS_DISPLAY_NAME, user.getDisplayName());
      node.setProperty(UserProperties.JOS_USER_NAME, node.getName());

      Calendar calendar = Calendar.getInstance();
      calendar.setTime(user.getCreatedDate());
      node.setProperty(UserProperties.JOS_CREATED_DATE, calendar);
   }
private void writeUser ( User user , Node node ) throws Exception { node . setProperty ( UserProperties . JOS_EMAIL , user . getEmail ( ) ) ; node . setProperty ( UserProperties . JOS_FIRST_NAME , user . getFirstName ( ) ) ; node . setProperty ( UserProperties . JOS_LAST_NAME , user . getLastName ( ) ) ; node . setProperty ( UserProperties . JOS_PASSWORD , user . getPassword ( ) ) ; node . setProperty ( UserProperties . JOS_DISPLAY_NAME , user . getDisplayName ( ) ) ; node . setProperty ( UserProperties . JOS_USER_NAME , node . getName ( ) ) ; Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( user . getCreatedDate ( ) ) ; node . setProperty ( UserProperties . JOS_CREATED_DATE , calendar ) ; }
Write user properties from the node to the storage.

@param node
the node where user properties are stored
@return {@link User}