FINERACT-724 fixes after review (part2)
This commit is contained in:
-1
@@ -32,7 +32,6 @@ public class PaginationHelper<E> {
|
|||||||
final List<E> items = jt.query(sqlFetchRows, args, rowMapper);
|
final List<E> items = jt.query(sqlFetchRows, args, rowMapper);
|
||||||
|
|
||||||
// determine how many rows are available
|
// determine how many rows are available
|
||||||
// final int totalFilteredRecords = jt.queryForInt(sqlCountRows);
|
|
||||||
final int totalFilteredRecords = jt.queryForObject(sqlCountRows, Integer.class);
|
final int totalFilteredRecords = jt.queryForObject(sqlCountRows, Integer.class);
|
||||||
|
|
||||||
return new Page<>(items, totalFilteredRecords);
|
return new Page<>(items, totalFilteredRecords);
|
||||||
|
|||||||
+8
@@ -38,6 +38,14 @@ import org.springframework.transaction.SavepointManager;
|
|||||||
import org.springframework.transaction.TransactionDefinition;
|
import org.springframework.transaction.TransactionDefinition;
|
||||||
import org.springframework.transaction.TransactionException;
|
import org.springframework.transaction.TransactionException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link org.springframework.orm.jpa.JpaDialect} implementation for Apache OpenJPA.
|
||||||
|
* Developed and tested against OpenJPA 2.2.
|
||||||
|
*
|
||||||
|
* @author Costin Leau
|
||||||
|
* @author Juergen Hoeller
|
||||||
|
* @since 2.0
|
||||||
|
*/
|
||||||
public class OpenJpaDialect extends DefaultJpaDialect {
|
public class OpenJpaDialect extends DefaultJpaDialect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+13
-1
@@ -30,7 +30,19 @@ import org.apache.openjpa.persistence.PersistenceProviderImpl;
|
|||||||
import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter;
|
import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter;
|
||||||
import org.springframework.orm.jpa.vendor.Database;
|
import org.springframework.orm.jpa.vendor.Database;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Apache OpenJPA.
|
||||||
|
* Developed and tested against OpenJPA 2.2.
|
||||||
|
*
|
||||||
|
* <p>Exposes OpenJPA's persistence provider and EntityManager extension interface,
|
||||||
|
* and supports {@link AbstractJpaVendorAdapter}'s common configuration settings.
|
||||||
|
*
|
||||||
|
* @author Costin Leau
|
||||||
|
* @author Juergen Hoeller
|
||||||
|
* @since 2.0
|
||||||
|
* @see org.apache.openjpa.persistence.PersistenceProviderImpl
|
||||||
|
* @see org.apache.openjpa.persistence.OpenJPAEntityManager
|
||||||
|
*/
|
||||||
public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter {
|
public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter {
|
||||||
|
|
||||||
private final PersistenceProvider persistenceProvider = new PersistenceProviderImpl();
|
private final PersistenceProvider persistenceProvider = new PersistenceProviderImpl();
|
||||||
|
|||||||
-1
@@ -147,7 +147,6 @@ public class TenantAwareBasicAuthenticationFilter extends BasicAuthenticationFil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// filterChain.doFilter(request, response);
|
|
||||||
super.doFilterInternal(request, response, filterChain);
|
super.doFilterInternal(request, response, filterChain);
|
||||||
} catch (final InvalidTenantIdentiferException e) {
|
} catch (final InvalidTenantIdentiferException e) {
|
||||||
// deal with exception at low level
|
// deal with exception at low level
|
||||||
|
|||||||
+2
-3
@@ -286,8 +286,7 @@ public class SmsMessageScheduledJobServiceImpl implements SmsMessageScheduledJob
|
|||||||
if (!smsMessageDeliveryReportData.getHasError()
|
if (!smsMessageDeliveryReportData.getHasError()
|
||||||
&& (deliveryStatus != 100)) {
|
&& (deliveryStatus != 100)) {
|
||||||
SmsMessage smsMessage = this.smsMessageRepository.findById(smsMessageDeliveryReportData.getId()).orElse(null);
|
SmsMessage smsMessage = this.smsMessageRepository.findById(smsMessageDeliveryReportData.getId()).orElse(null);
|
||||||
Integer statusType;
|
Integer statusType = smsMessage.getStatusType();
|
||||||
boolean statusChanged;
|
|
||||||
|
|
||||||
switch (deliveryStatus) {
|
switch (deliveryStatus) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -312,7 +311,7 @@ public class SmsMessageScheduledJobServiceImpl implements SmsMessageScheduledJob
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
statusChanged = !statusType.equals(smsMessage.getStatusType());
|
boolean statusChanged = !statusType.equals(smsMessage.getStatusType());
|
||||||
|
|
||||||
// update the status Type enum
|
// update the status Type enum
|
||||||
smsMessage.setStatusType(statusType);
|
smsMessage.setStatusType(statusType);
|
||||||
|
|||||||
@@ -34,8 +34,6 @@
|
|||||||
<sec:global-method-security
|
<sec:global-method-security
|
||||||
pre-post-annotations="enabled" />
|
pre-post-annotations="enabled" />
|
||||||
|
|
||||||
<!-- <tx:annotation-driven />-->
|
|
||||||
|
|
||||||
<context:component-scan
|
<context:component-scan
|
||||||
base-package="org.apache.fineract.accounting.*,
|
base-package="org.apache.fineract.accounting.*,
|
||||||
org.apache.fineract.commands.provider.*,
|
org.apache.fineract.commands.provider.*,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
package org.apache.fineract.notification;
|
package org.apache.fineract.notification;
|
||||||
|
|
||||||
import edu.emory.mathcs.backport.java.util.Collections;
|
import java.util.Collections;
|
||||||
import org.apache.fineract.notification.domain.Notification;
|
import org.apache.fineract.notification.domain.Notification;
|
||||||
import org.apache.fineract.notification.domain.NotificationMapper;
|
import org.apache.fineract.notification.domain.NotificationMapper;
|
||||||
import org.apache.fineract.notification.service.NotificationGeneratorReadRepositoryWrapper;
|
import org.apache.fineract.notification.service.NotificationGeneratorReadRepositoryWrapper;
|
||||||
|
|||||||
Reference in New Issue
Block a user