-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pagination / filter / ordering #86
Conversation
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
… be empty" This reverts commit f618f82.
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Signed-off-by: LE SAULNIER Kevin <[email protected]>
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.
just some (optional) updates on javadoc, still good for me
@@ -7,12 +13,15 @@ | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.UUID; | |||
/** | |||
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | |||
*/ | |||
|
|||
public interface CommonLimitViolationRepository<T> { | |||
/** | |||
* Returns specification depending on {filters} |
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.
* Returns specification depending on {filters} | |
* Returns specification depending on {@code filters}<br/> |
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.
changed
* This interface is common for both SubjectLimitViolationRepository and ContingencyRepository | ||
* except for <i>addPredicate</i> which need to be implemented |
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 interface is common for both SubjectLimitViolationRepository and ContingencyRepository | |
* except for <i>addPredicate</i> which need to be implemented | |
* This interface is common for both {@link SubjectLimitViolationRepository} and {@link ContingencyRepository} | |
* except for {@link #addPredicate(CriteriaBuilder, Root, List, ResourceFilterDTO) addPredicate} | |
* which need to be implemented |
/** | ||
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | ||
*/ | ||
|
||
/** | ||
* An object that can be used to filter data with the JPA Criteria API (via Spring Specification) | ||
* @param dataType the type of data we want to filter (text, number) | ||
* @param type the type of filter (contains, startsWith...) | ||
* @param value the value of the filter | ||
* @param column the column / field on which the filter will be applied | ||
*/ |
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.
Dangling Javadoc comment
You can't have 2 javadoc blocks on same element
/** | |
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | |
*/ | |
/** | |
* An object that can be used to filter data with the JPA Criteria API (via Spring Specification) | |
* @param dataType the type of data we want to filter (text, number) | |
* @param type the type of filter (contains, startsWith...) | |
* @param value the value of the filter | |
* @param column the column / field on which the filter will be applied | |
*/ | |
/** | |
* An object that can be used to filter data with the JPA Criteria API (via Spring Specification) | |
* @param dataType the type of data we want to filter (text, number) | |
* @param type the type of filter (contains, startsWith...) | |
* @param value the value of the filter | |
* @param column the column / field on which the filter will be applied | |
* | |
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | |
*/ |
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.
fixed
/** | ||
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | ||
*/ | ||
|
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.
/** | |
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | |
*/ | |
/** | |
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | |
*/ |
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.
fixed
import java.util.List; | ||
import java.util.UUID; | ||
import java.util.*; | ||
|
||
/** | ||
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | ||
*/ | ||
|
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.
} | ||
|
||
/** | ||
* returns atomic predicate depending on filter.dataType() and filter.type() |
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.
* returns atomic predicate depending on filter.dataType() and filter.type() | |
* Returns atomic {@link Predicate} depending on {@code filter.dataType()} and {@code filter.type()} |
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.
fixed
*/ | ||
private static Predicate filterToAtomicPredicate(CriteriaBuilder criteriaBuilder, Expression<?> expression, ResourceFilterDTO filter, Object value) { |
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.
*/ | |
private static Predicate filterToAtomicPredicate(CriteriaBuilder criteriaBuilder, Expression<?> expression, ResourceFilterDTO filter, Object value) { | |
* @throws UnsupportedOperationException if {@link ResourceFilterDTO.DataType filter.type} not supported or {@code filter.value} is {@code null} | |
*/ | |
private static Predicate filterToAtomicPredicate(CriteriaBuilder criteriaBuilder, Expression<?> expression, ResourceFilterDTO filter, Object value) throws UnsupportedOperationException { |
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.
fixed
case EQUALS -> criteriaBuilder.equal(criteriaBuilder.upper(stringExpression), stringValue.toUpperCase()); | ||
}; | ||
} else { | ||
throw new UnsupportedOperationException("Not implemented"); |
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.
throw new UnsupportedOperationException("Not implemented"); | |
throw new UnsupportedOperationException("Not supported type " + filter.dataType()); |
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.
fixed
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
/** | ||
* @author Kevin Le Saulnier <kevin.lesaulnier at rte-france.com> | ||
*/ | ||
|
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.
import static com.vladmihalcea.sql.SQLStatementCountValidator.reset; | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.gridsuite.securityanalysis.server.SecurityAnalysisProviderMock.*; | ||
/** |
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.
/** | |
/** |
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.
test OK
Signed-off-by: LE SAULNIER Kevin <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
No description provided.