Class BackofficeSubsystemRepository
java.lang.Object
es.kukenan.smartfi.microservice.contracts.repository.BackofficeSubsystemRepository
Repository that holds the queries to retrieve
BackofficeSubsystems.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classMapper class to extractBackofficeSubsystemsfrom query. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringQuery to exists contract is null in product table.private static final StringQuery to find all subsystems that have, at least, one product registered, ordering by back office and filtering by subtypes.private static final StringQuery to find all subsystems that have, at least, one product registered, ordering by back office and filtering by types.private static final StringQuery to find all subsystems that have, at least, one product registered, grouping by back office and filtering by user.private static final StringParams clause finish character.private org.springframework.jdbc.core.JdbcTemplateJdbcTemplate to query the database.private static final StringParam to add in the query.private static final StringPattern to replace in the query.private static final StringParams query separator.private static final StringParams clause start character. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringcreateRealParamsNumber(List<Integer> params) existsContractIsNull(String userId) Find all subsystems that have, at least, one product registered, grouping by back office and filtering by user.findBySubtypes(List<Integer> subtypes) Find all subsystems that have, at least, one product registered, grouping by back office and filtering by subtypes.findByType(Integer typeId) Find all subsystems that have, at least, one product registered, grouping by back office and filtering by type.findByUserIdAndContractId(String userId, String contractId) Find all subsystems that have, at least, one product registered, grouping by back office and filtering by user.
-
Field Details
-
PATTERN
Pattern to replace in the query.- See Also:
-
PARAM
Param to add in the query.- See Also:
-
SEPARATOR
Params query separator.- See Also:
-
START_CHARACTER
Params clause start character.- See Also:
-
FINISH_CHARACTER
Params clause finish character.- See Also:
-
FIND_BY_USERID_AND_CONTRACTID
Query to find all subsystems that have, at least, one product registered, grouping by back office and filtering by user.- See Also:
-
EXISTS_CONTRACT_NULL
Query to exists contract is null in product table.- See Also:
-
FIND_BY_SUBSYSTEMS
Query to find all subsystems that have, at least, one product registered, ordering by back office and filtering by subtypes.- See Also:
-
FIND_BY_TYPE
Query to find all subsystems that have, at least, one product registered, ordering by back office and filtering by types.- See Also:
-
jdbcTemplate
@Autowired private org.springframework.jdbc.core.JdbcTemplate jdbcTemplateJdbcTemplate to query the database.
-
-
Constructor Details
-
BackofficeSubsystemRepository
public BackofficeSubsystemRepository()
-
-
Method Details
-
findByUserIdAndContractId
Find all subsystems that have, at least, one product registered, grouping by back office and filtering by user.- Parameters:
userId- user identifier.contractId- contract identifier.- Returns:
- back office subsystems.
-
existsContractIsNull
Find all subsystems that have, at least, one product registered, grouping by back office and filtering by user.- Parameters:
userId- user identifier.- Returns:
- back office subsystems.
-
findBySubtypes
Find all subsystems that have, at least, one product registered, grouping by back office and filtering by subtypes.- Parameters:
subtypes- subtypes list to filter.- Returns:
- back office subsystems.
-
findByType
Find all subsystems that have, at least, one product registered, grouping by back office and filtering by type.- Parameters:
typeId- type to filter.- Returns:
- back office subsystems.
-
createRealParamsNumber
-