* Permet de récupérer un objet via son ID
* @return
*/
public Ranking find() {
byte data[] = null;
Ranking rank = null;
try {
_recordId = -1;
// Find the first available record
RecordEnumeration re = _rs.enumerateRecords(null, null, false);
while (re.hasNextElement()) {
_recordId = re.nextRecordId();
}
// If a record was found then load it
if (_recordId != -1) {
data = _rs.getRecord(_recordId);
}
} catch (Exception e) {
e.printStackTrace();
}
// if there is data then restore the deck information
if (data != null) {
try {
rank = new Ranking();
rank.setBytes(data);
} catch (Exception e) {
System.out.println(e);
}
}