Add capability to search policies by device type #339
Merged
pahansith
merged 1 commits from ashvini/device-mgt-core:Improvement#10585
into master
6 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'ashvini/device-mgt-core:Improvement#10585'
Deleting a branch is permanent. It CANNOT be undone. Continue?
WIP: Add capability to search policies by device typeto Add capability to search policies by device type 11 months agopackage io.entgra.device.mgt.core.policy.mgt.core.dao.impl.policy;
import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.*;
Do not use wild card imports.
d2301d54dd
to6e1f9d9655
6 months agoreturn policies;
}
protected List<Policy> extractPolicyListWithProfileFromDbResult(ResultSet resultSet, int tenantId) throws SQLException {
Add java doc comments
protected List<Policy> extractPolicyListWithProfileFromDbResult(ResultSet resultSet, int tenantId) throws SQLException {
List<Policy> policies = new ArrayList<>();
while (resultSet.next()) {
Policy policy = new Policy();
Move the declaration logic out side the loop
List<Policy> policies = new ArrayList<>();
while (resultSet.next()) {
Policy policy = new Policy();
policy.setId(resultSet.getInt("ID"));
Better to move the populating logic into a separate method
policy.setPolicyType(resultSet.getString("POLICY_TYPE"));
policy.setPolicyPayloadVersion(resultSet.getString("PAYLOAD_VERSION"));
Profile profile = new Profile();
Move the declaration logic out side the loop
isDeviceTypeProvided = true;
}
query += "ORDER BY P.ID LIMIT ?,?";
Is limit keyword exists in oracle sql syntax? Check if this part is syntactically correct with Oracle SQL.
isDeviceTypeProvided = true;
}
query += "ORDER BY P.ID LIMIT ?,?";
For PostgreSQL it is necessary to specify the
LIMIT
andOFFSET
isDeviceTypeProvided = true;
}
query += "ORDER BY P.ID LIMIT ?,?";
Check this syntax correct with MSSQL syntax
6e1f9d9655
toc760b20f1c
6 months agoc760b20f1c
to8a82d1666c
6 months ago290952ae53
into master 6 months agoReviewers
290952ae53
.