Added the get method to the storage medium

This commit is contained in:
2021-08-19 17:20:33 +02:00
parent 96ad704707
commit e88169147c

View File

@ -61,6 +61,16 @@ public abstract class SQLStorageMedium extends SQLTable {
update().where("keyName", key).delete(); update().where("keyName", key).delete();
} }
/**
* Gets the value of a key
*
* @param key The key of the value you want to get
* @return the value you want to get
*/
public String get(String key) {
return select().where("keyName", key).getResult().getString("value");
}
/** /**
* Gets all entries from the storage medium * Gets all entries from the storage medium
* *