Class GECoUtils


  • public class GECoUtils
    extends java.lang.Object
    • Field Detail

      • MAPPER

        public static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
    • Constructor Detail

      • GECoUtils

        public GECoUtils()
    • Method Detail

      • getUserFromJSON

        public static User getUserFromJSON​(UserObject userObject)
        Converts a user JSON object to a user object.
        Parameters:
        userObject - The user JSON object to convert.
        Returns:
        The converted user object.
      • getSeatFromJSON

        public static Seat getSeatFromJSON​(GECoClient client,
                                           SeatObject seatObject)
        Converts a seat JSON object to a seat object.
        Parameters:
        seatObject - The seat object to convert.
        Returns:
        The converted seat object.
      • getLanUserFromJSON

        public static LanUser getLanUserFromJSON​(GECoClient client,
                                                 LanUserObject lanUserObject)
        Converts a lan user JSON object to a lan user object.
        Parameters:
        client - The client associated with the lan user.
        lanUserObject - The lan user object to convert.
        Returns:
        The converted lan user object.
      • getBorrowedItemFromJSON

        public static BorrowedItem getBorrowedItemFromJSON​(GECoClient client,
                                                           BorrowedItemObject borrowedItemObject,
                                                           java.lang.Long userID)
        Converts a borrowed item JSON object to a borrowed item object.
        Parameters:
        client - The client associated with the borrowed item.
        borrowedItemObject - The borrowed item object to convert.
        userID - The ID of the user borrowing the item.
        Returns:
        The converted borrowed item object.
      • getNewsFromJSON

        public static News getNewsFromJSON​(NewsObject newsObject)
        Converts a news JSON object to a news object.
        Parameters:
        newsObject - The news object to convert.
        Returns:
        The converted news object.
      • getEventFromJSON

        public static Event getEventFromJSON​(EventObject eventObject)
        Converts an event JSON object to a event object.
        Parameters:
        eventObject - The event object to convert.
        Returns:
        The converted event object.