Package ch.ethz.geco.g4j.internal
Class GECoUtils
- java.lang.Object
-
- ch.ethz.geco.g4j.internal.GECoUtils
-
public class GECoUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static com.fasterxml.jackson.databind.ObjectMapper
MAPPER
-
Constructor Summary
Constructors Constructor Description GECoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BorrowedItem
getBorrowedItemFromJSON(GECoClient client, BorrowedItemObject borrowedItemObject, java.lang.Long userID)
Converts a borrowed item JSON object to a borrowed item object.static Event
getEventFromJSON(EventObject eventObject)
Converts an event JSON object to a event object.static LanUser
getLanUserFromJSON(GECoClient client, LanUserObject lanUserObject)
Converts a lan user JSON object to a lan user object.static News
getNewsFromJSON(NewsObject newsObject)
Converts a news JSON object to a news object.static Seat
getSeatFromJSON(GECoClient client, SeatObject seatObject)
Converts a seat JSON object to a seat object.static User
getUserFromJSON(UserObject userObject)
Converts a user JSON object to a user object.
-
-
-
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.
-
-