remove invalid suppressings and issue found by ashok in savings.
This commit is contained in:
+1
-5
@@ -28,7 +28,6 @@ public class ScheduledJobDetail extends AbstractPersistable<Long> {
|
||||
@Column(name = "cron_expression")
|
||||
private String cronExpression;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Column(name = "create_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date createTime;
|
||||
@@ -39,7 +38,6 @@ public class ScheduledJobDetail extends AbstractPersistable<Long> {
|
||||
@Column(name = "group_name")
|
||||
private String groupName;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Column(name = "previous_run_start_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date previousRunStartTime;
|
||||
@@ -51,7 +49,6 @@ public class ScheduledJobDetail extends AbstractPersistable<Long> {
|
||||
@Column(name = "job_key")
|
||||
private String jobKey;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Column(name = "initializing_errorlog")
|
||||
private String errorLog;
|
||||
|
||||
@@ -61,7 +58,6 @@ public class ScheduledJobDetail extends AbstractPersistable<Long> {
|
||||
@Column(name = "currently_running")
|
||||
private boolean currentlyRunning;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Column(name = "updates_allowed")
|
||||
private boolean updatesAllowed;
|
||||
|
||||
@@ -162,7 +158,7 @@ public class ScheduledJobDetail extends AbstractPersistable<Long> {
|
||||
return this.triggerMisfired;
|
||||
}
|
||||
|
||||
public void updateTriggerMisfired(boolean triggerMisfired) {
|
||||
public void updateTriggerMisfired(final boolean triggerMisfired) {
|
||||
this.triggerMisfired = triggerMisfired;
|
||||
}
|
||||
|
||||
|
||||
-8
@@ -18,37 +18,29 @@ public class ScheduledJobRunHistory extends AbstractPersistable<Long> {
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "job_id")
|
||||
@SuppressWarnings("unused")
|
||||
private ScheduledJobDetail scheduledJobDetail;
|
||||
|
||||
@Column(name = "version")
|
||||
@SuppressWarnings("unused")
|
||||
private Long version;
|
||||
|
||||
@Column(name = "start_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@SuppressWarnings("unused")
|
||||
private Date startTime;
|
||||
|
||||
@Column(name = "end_time")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@SuppressWarnings("unused")
|
||||
private Date endTime;
|
||||
|
||||
@Column(name = "status")
|
||||
@SuppressWarnings("unused")
|
||||
private String status;
|
||||
|
||||
@Column(name = "error_message")
|
||||
@SuppressWarnings("unused")
|
||||
private String errorMessage;
|
||||
|
||||
@Column(name = "trigger_type")
|
||||
@SuppressWarnings("unused")
|
||||
private String triggerType;
|
||||
|
||||
@Column(name = "error_log")
|
||||
@SuppressWarnings("unused")
|
||||
private String errorLog;
|
||||
|
||||
public ScheduledJobRunHistory() {
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class PortfolioAccountReadPlatformServiceImpl implements PortfolioAccount
|
||||
case SAVINGS:
|
||||
sql = "select " + this.savingsAccountMapper.schema() + " where sa.id = ?";
|
||||
if (currencyCode != null) {
|
||||
sql += " and la.currency_code = ?";
|
||||
sql += " and sa.currency_code = ?";
|
||||
sqlParams = new Object[] {accountId, currencyCode};
|
||||
}
|
||||
|
||||
|
||||
+26
-26
@@ -38,7 +38,6 @@ import org.mifosplatform.infrastructure.core.service.DateUtils;
|
||||
import org.mifosplatform.organisation.office.domain.Office;
|
||||
import org.mifosplatform.organisation.staff.domain.Staff;
|
||||
import org.mifosplatform.portfolio.client.domain.Client;
|
||||
import org.mifosplatform.portfolio.client.domain.ClientStatus;
|
||||
import org.mifosplatform.portfolio.group.api.GroupingTypesApiConstants;
|
||||
import org.mifosplatform.portfolio.group.exception.ClientExistInGroupException;
|
||||
import org.mifosplatform.portfolio.group.exception.ClientNotInGroupException;
|
||||
@@ -111,7 +110,8 @@ public final class Group extends AbstractPersistable<Long> {
|
||||
LocalDate groupActivationDate = null;
|
||||
if (active) {
|
||||
status = GroupingTypeStatus.ACTIVE;
|
||||
groupActivationDate = activationDate;//set activation date only if group is made active
|
||||
groupActivationDate = activationDate;// set activation date only if
|
||||
// group is made active
|
||||
}
|
||||
|
||||
return new Group(office, staff, parent, groupLevel, name, externalId, status, groupActivationDate, clientMembers, groupMembers);
|
||||
@@ -310,8 +310,8 @@ public final class Group extends AbstractPersistable<Long> {
|
||||
public List<String> updateClientMembersIfDifferent(final Set<Client> clientMembersSet) {
|
||||
List<String> differences = new ArrayList<String>();
|
||||
if (!clientMembersSet.equals(this.clientMembers)) {
|
||||
Set<Client> diffClients = Sets.symmetricDifference(clientMembersSet, this.clientMembers);
|
||||
String[] diffClientsIds = getClientIds(diffClients);
|
||||
final Set<Client> diffClients = Sets.symmetricDifference(clientMembersSet, this.clientMembers);
|
||||
final String[] diffClientsIds = getClientIds(diffClients);
|
||||
if (diffClientsIds != null) {
|
||||
differences = Arrays.asList(diffClientsIds);
|
||||
}
|
||||
@@ -322,35 +322,33 @@ public final class Group extends AbstractPersistable<Long> {
|
||||
}
|
||||
|
||||
public List<String> associateClients(final Set<Client> clientMembersSet) {
|
||||
List<String> differences = new ArrayList<String>();
|
||||
for (Client client : clientMembersSet) {
|
||||
if(this.hasClientAsMember(client)){
|
||||
throw new ClientExistInGroupException(client.getId(), this.getId());
|
||||
}
|
||||
final List<String> differences = new ArrayList<String>();
|
||||
for (final Client client : clientMembersSet) {
|
||||
if (hasClientAsMember(client)) { throw new ClientExistInGroupException(client.getId(), getId()); }
|
||||
this.clientMembers.add(client);
|
||||
differences.add(client.getId().toString());
|
||||
}
|
||||
|
||||
return differences;
|
||||
}
|
||||
|
||||
|
||||
public List<String> disassociateClients(final Set<Client> clientMembersSet) {
|
||||
List<String> differences = new ArrayList<String>();
|
||||
for (Client client : clientMembersSet) {
|
||||
if(this.hasClientAsMember(client)){
|
||||
final List<String> differences = new ArrayList<String>();
|
||||
for (final Client client : clientMembersSet) {
|
||||
if (hasClientAsMember(client)) {
|
||||
this.clientMembers.remove(client);
|
||||
differences.add(client.getId().toString());
|
||||
}else{
|
||||
throw new ClientNotInGroupException(client.getId(), this.getId());
|
||||
}
|
||||
} else {
|
||||
throw new ClientNotInGroupException(client.getId(), getId());
|
||||
}
|
||||
}
|
||||
|
||||
return differences;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String[] getClientIds(final Set<Client> clients) {
|
||||
String[] clientIds = new String[clients.size()];
|
||||
Iterator<Client> it = clients.iterator();
|
||||
final String[] clientIds = new String[clients.size()];
|
||||
final Iterator<Client> it = clients.iterator();
|
||||
for (int i = 0; it.hasNext(); i++) {
|
||||
clientIds[i] = it.next().getId().toString();
|
||||
}
|
||||
@@ -385,15 +383,17 @@ public final class Group extends AbstractPersistable<Long> {
|
||||
public boolean isCenter() {
|
||||
return this.groupLevel.isCenter();
|
||||
}
|
||||
|
||||
public boolean isTransferInProgress () {
|
||||
|
||||
public boolean isTransferInProgress() {
|
||||
return GroupingTypeStatus.fromInt(this.status).isTransferInProgress();
|
||||
}
|
||||
|
||||
public boolean isChildClient(final Long clientId){
|
||||
|
||||
public boolean isChildClient(final Long clientId) {
|
||||
if (clientId != null && this.clientMembers != null && !this.clientMembers.isEmpty()) {
|
||||
for (Client client : this.clientMembers) {
|
||||
if(client.getId().equals(clientId)) return true;
|
||||
for (final Client client : this.clientMembers) {
|
||||
if (client.getId().equals(clientId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user