-
Notifications
You must be signed in to change notification settings - Fork 62
[#1143] Table Data Should Be Sorted Chronologically By Default #1144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b89d16e
9d5c374
c6afc57
a2379bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,47 +10,49 @@ | |
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * Repository interface for managing {@link EndorsementCredential} entities in the database. | ||
| * | ||
| * <p> | ||
| * The {@link EndorsementCredentialRepository} interface extends {@link JpaRepository} to provide basic CRUD operations, | ||
| * including save, find, delete, and query methods. Custom query methods can be defined | ||
| * using Spring Data JPA's query method naming conventions or with the Query annotation. | ||
| * </p> | ||
| */ | ||
| @Repository | ||
| public interface EndorsementCredentialRepository extends JpaRepository<EndorsementCredential, UUID> { | ||
|
|
||
| /** | ||
| * Query that retrieves a list of endorsement credentials using the provided archive flag. | ||
| * Query that retrieves a count of {@link EndorsementCredential} objects in the database filtered by the | ||
| * provided archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @return a list of endorsement credentials | ||
| * @return a count of {@link EndorsementCredential} objects | ||
| */ | ||
| List<EndorsementCredential> findByArchiveFlag(boolean archiveFlag); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method was originally used to retrieve all entries from the repository and then count them using .size(). Since its only purpose was to get the total number of entries, it was replaced with countBy…, which performs a direct count query in the database, making it more efficient. |
||
| long countByArchiveFlag(boolean archiveFlag); | ||
|
|
||
| /** | ||
| * Query that retrieves a page of endorsement credentials using provided archive flag and pageable value. | ||
| * Query that retrieves a page of {@link EndorsementCredential} objects filtered by the specified archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @param pageable pageable value | ||
| * @return a page of endorsement credentials | ||
| * @return a page of {@link EndorsementCredential} objects | ||
| */ | ||
| Page<EndorsementCredential> findByArchiveFlag(boolean archiveFlag, Pageable pageable); | ||
|
|
||
| /** | ||
| * Query that retrieves an endorsement credential using the provided holder serial number. | ||
| * | ||
| * @param holderSerialNumber big integer representation of the holder serial number | ||
| * @return an endorsement credential | ||
| */ | ||
| EndorsementCredential findByHolderSerialNumber(BigInteger holderSerialNumber); | ||
|
|
||
| /** | ||
| * Query that retrieves an endorsement credential using the provided serial number. | ||
| * Query that retrieves an {@link EndorsementCredential} object using the provided serial number. | ||
| * | ||
| * @param serialNumber big integer representation of the serial number | ||
| * @return an endorsement credential | ||
| * @return an {@link EndorsementCredential} object | ||
| */ | ||
| EndorsementCredential findBySerialNumber(BigInteger serialNumber); | ||
|
|
||
| /** | ||
| * Query that retrieves a list of endorsement credentials using the provided device id. | ||
| * Query that retrieves a list of {@link EndorsementCredential} objects using the provided device id. | ||
| * | ||
| * @param deviceId uuid representation of the device id | ||
| * @return an endorsement credential | ||
| * @return a list of {@link EndorsementCredential} objects | ||
| */ | ||
| List<EndorsementCredential> findByDeviceId(UUID deviceId); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,80 +6,34 @@ | |
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import org.springframework.stereotype.Repository; | ||
|
|
||
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * Repository interface for managing {@link IDevIDCertificate} entities in the database. | ||
| * | ||
| * <p> | ||
| * The {@link IDevIDCertificateRepository} interface extends {@link JpaRepository} to provide basic CRUD operations, | ||
| * including save, find, delete, and query methods. Custom query methods can be defined | ||
| * using Spring Data JPA's query method naming conventions or with the Query annotation. | ||
| * </p> | ||
| */ | ||
| @Repository | ||
| public interface IDevIDCertificateRepository extends JpaRepository<IDevIDCertificate, UUID> { | ||
|
|
||
| /** | ||
| * Query that retrieves a list of IDevId certificates using the provided archive flag. | ||
| * Query that retrieves a count of {@link IDevIDCertificate} objects in the database filtered by the provided archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @return a list of IDevId certificates | ||
| * @return a count of {@link IDevIDCertificate} objects | ||
| */ | ||
| List<IDevIDCertificate> findByArchiveFlag(boolean archiveFlag); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method was originally used to retrieve all entries from the repository and then count them using .size(). Since its only purpose was to get the total number of entries, it was replaced with countBy…, which performs a direct count query in the database, making it more efficient. |
||
| long countByArchiveFlag(boolean archiveFlag); | ||
|
|
||
| /** | ||
| * Query that retrieves a page of IDevId certificates using the provided archive flag and pageable value. | ||
| * Query that retrieves a page of {@link IDevIDCertificate} objects filtered by the specified archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @param pageable pageable value | ||
| * @return a page of IDevId certificates | ||
| * @return a page of {@link IDevIDCertificate} objects | ||
| */ | ||
| Page<IDevIDCertificate> findByArchiveFlag(boolean archiveFlag, Pageable pageable); | ||
|
|
||
|
|
||
| // /** | ||
| // * Query that retrieves a list of IDevId certificates using the provided subject. | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed unused repository methods. |
||
| // * | ||
| // * @param subject string representation of the subject | ||
| // * @return a list of IDevId certificates | ||
| // */ | ||
| // List<IDevIDCertificate> findBySubject(String subject); | ||
| // | ||
| // /** | ||
| // * Query that retrieves a sorted list of IDevId certificates using the provided subject. | ||
| // * | ||
| // * @param subject string representation of the subject | ||
| // * @return a sorted list of IDevId certificates | ||
| // */ | ||
| // List<IDevIDCertificate> findBySubjectSorted(String subject); | ||
| // | ||
| // /** | ||
| // * Query that retrieves a list of IDevId certificates using the provided subject and archive flag. | ||
| // * | ||
| // * @param subject string representation of the subject | ||
| // * @param archiveFlag archive flag | ||
| // * @return a list of IDevId certificates | ||
| // */ | ||
| // List<IDevIDCertificate> findBySubjectAndArchiveFlag(String subject, boolean archiveFlag); | ||
| // | ||
| // /** | ||
| // * Query that retrieves a sorted list of IDevId certificates using the provided subject | ||
| // * and archive flag. | ||
| // * | ||
| // * @param subject string representation of the subject | ||
| // * @param archiveFlag archive flag | ||
| // * @return a sorted list of IDevId certificates | ||
| // */ | ||
| // List<IDevIDCertificate> findBySubjectSortedAndArchiveFlag(String subject, boolean archiveFlag); | ||
| // | ||
| // /** | ||
| // * Query that retrieves an IDevId certificate using the provided subject key identifier. | ||
| // * | ||
| // * @param subjectKeyIdentifier byte representation of the subject key identifier | ||
| // * @return an IDevId certificate | ||
| // */ | ||
| // IDevIDCertificate findBySubjectKeyIdentifier(byte[] subjectKeyIdentifier); | ||
| // | ||
| // /** | ||
| // * Query that retrieves an IDevId certificate using the provided subject key and archive flag. | ||
| // * | ||
| // * @param subjectKeyIdString string representation of the subject key id | ||
| // * @param archiveFlag archive flag | ||
| // * @return an IDevId certificate | ||
| // */ | ||
| // IDevIDCertificate findBySubjectKeyIdStringAndArchiveFlag(String subjectKeyIdString, | ||
| // boolean archiveFlag); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,32 +9,41 @@ | |
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * Repository interface for managing {@link IssuedAttestationCertificate} entities in the database. | ||
| * | ||
| * <p> | ||
| * The {@link IssuedCertificateRepository} interface extends {@link JpaRepository} to provide basic CRUD operations, | ||
| * including save, find, delete, and query methods. Custom query methods can be defined | ||
| * using Spring Data JPA's query method naming conventions or with the Query annotation. | ||
| * </p> | ||
| */ | ||
| @Repository | ||
| public interface IssuedCertificateRepository extends JpaRepository<IssuedAttestationCertificate, UUID> { | ||
|
|
||
| /** | ||
| * Query that retrieves a list of issued attestation certificates using the provided archive flag. | ||
| * Query that retrieves a count of {@link IssuedAttestationCertificate} objects in the database filtered by the provided archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @return a list of issued attestation certificates | ||
| * @return a count of {@link IssuedAttestationCertificate} objects | ||
| */ | ||
| List<IssuedAttestationCertificate> findByArchiveFlag(boolean archiveFlag); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method was originally used to retrieve all entries from the repository and then count them using .size(). Since its only purpose was to get the total number of entries, it was replaced with countBy…, which performs a direct count query in the database, making it more efficient. |
||
| long countByArchiveFlag(boolean archiveFlag); | ||
|
|
||
| /** | ||
| * Query that retrieves a page of issued attestation certificates using the provided archive flag | ||
| * Query that retrieves a page of {@link IssuedAttestationCertificate} objects using the provided archive flag | ||
| * and pageable value. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @param pageable pageable value | ||
| * @return a page of issued attestation certificates | ||
| * @return a page of {@link IssuedAttestationCertificate} objects | ||
| */ | ||
| Page<IssuedAttestationCertificate> findByArchiveFlag(boolean archiveFlag, Pageable pageable); | ||
|
|
||
| /** | ||
| * Query that retrieves a list of issued attestation certificates using the provided device id. | ||
| * Query that retrieves a list of {@link IssuedAttestationCertificate} objects using the provided device id. | ||
| * | ||
| * @param deviceId uuid representation of the device id | ||
| * @return a list of issued attestation certificates | ||
| * @return a list of {@link IssuedAttestationCertificate} objects | ||
| */ | ||
| List<IssuedAttestationCertificate> findByDeviceId(UUID deviceId); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,32 +9,40 @@ | |
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * Repository interface for managing {@link PlatformCredential} entities in the database. | ||
| * | ||
| * <p> | ||
| * The {@link PlatformCertificateRepository} interface extends {@link JpaRepository} to provide basic CRUD operations, | ||
| * including save, find, delete, and query methods. Custom query methods can be defined | ||
| * using Spring Data JPA's query method naming conventions or with the Query annotation. | ||
| * </p> | ||
| */ | ||
| @Repository | ||
| public interface PlatformCertificateRepository extends JpaRepository<PlatformCredential, UUID> { | ||
|
|
||
| /** | ||
| * Query that retrieves a list of platform credentials using the provided archive flag. | ||
| * Query that retrieves a count of {@link PlatformCredential} objects in the database filtered by the provided archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @return a list of platform credentials | ||
| * @return a count of {@link PlatformCredential} objects | ||
| */ | ||
| List<PlatformCredential> findByArchiveFlag(boolean archiveFlag); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method was originally used to retrieve all entries from the repository and then count them using .size(). Since its only purpose was to get the total number of entries, it was replaced with countBy…, which performs a direct count query in the database, making it more efficient. |
||
| long countByArchiveFlag(boolean archiveFlag); | ||
|
|
||
| /** | ||
| * Query that retrieves a page of platform credentials using the provided archive flag | ||
| * and pageable value. | ||
| * Query that retrieves a page of {@link PlatformCredential} objects filtered by the specified archive flag. | ||
| * | ||
| * @param archiveFlag archive flag | ||
| * @param pageable pageable | ||
| * @return a page of platform credentials | ||
| * @return a page of {@link PlatformCredential} objects | ||
| */ | ||
| Page<PlatformCredential> findByArchiveFlag(boolean archiveFlag, Pageable pageable); | ||
|
|
||
| /** | ||
| * Query that retrieves a list of platform credentials using the provided device id. | ||
| * Query that retrieves a list of {@link PlatformCredential} objects using the provided device id. | ||
| * | ||
| * @param deviceId uuid representation of the device id | ||
| * @return a list of platform credentials | ||
| * @return a list of {@link PlatformCredential} objects | ||
| */ | ||
| List<PlatformCredential> findByDeviceId(UUID deviceId); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method was originally used to retrieve all entries from the repository and then count them using .size(). Since its only purpose was to get the total number of entries, it was replaced with countBy…, which performs a direct count query in the database, making it more efficient.