I want to refer a fieldname in one class of java to another. Ex: PageRequest.of(pageNumber, pageSize, Sort.by(Sort.Direction.DESC, "timestampCreate"));
Here 'timestampCreate' is field name of another class, say Employee. I do not want to hardcode and also want it to be future proof, in case the field name changes. Please suggest an idea. Thanks!
Aucun commentaire:
Enregistrer un commentaire