samples = qb.build().list();
if (samples.isEmpty()) {
return null;
}
return samples.get(0);
}
/**
* Detaches all samples of this type from the session. Changes to them may not be
* written back to the database.
*
* Subclasses should call this method after performing custom queries.
*/
protected void detachFromSession() {
getSampleDao().detachAll();
}
@NonNull
public abstract AbstractDao getSampleDao();
@NonNull
protected abstract Property getTimestampSampleProperty();
@NonNull
protected abstract Property getDeviceIdentifierSampleProperty();
}