public void checkinKey(String key) { barcodeObject keyObject = shared.getBarcodeObject(key); if (keyObject.getType().equals("key")) { shared.checkoutKey(keyObject, null); } }
public void checkoutKey(String key, String user) { barcodeObject userObject = shared.getBarcodeObject(user); barcodeObject keyObject = shared.getBarcodeObject(key); if (userObject.getType().equals("user") && keyObject.getType().equals("key")) { shared.checkoutKey(keyObject, userObject); } }