remove unused import warnings.

This commit is contained in:
Keith Woodlock
2013-04-05 22:31:07 +01:00
parent 9011f5568c
commit 87ee45a592
3 changed files with 123 additions and 139 deletions
@@ -2,11 +2,8 @@ package org.mifosplatform.integrationtests.common;
import static com.jayway.restassured.RestAssured.given; import static com.jayway.restassured.RestAssured.given;
import static com.jayway.restassured.path.json.JsonPath.from; import static com.jayway.restassured.path.json.JsonPath.from;
import static org.junit.Assert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import org.apache.commons.lang.StringUtils;
import org.apache.http.conn.HttpHostConnectException; import org.apache.http.conn.HttpHostConnectException;
import com.jayway.restassured.RestAssured; import com.jayway.restassured.RestAssured;
@@ -83,14 +83,11 @@ public class CommandSource extends AbstractPersistable<Long> {
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date checkedOnDate; private Date checkedOnDate;
@SuppressWarnings("unused")
@Column(name = "processing_result_enum", nullable = false) @Column(name = "processing_result_enum", nullable = false)
private Integer processingResult; private Integer processingResult;
public static CommandSource fullEntryFrom(final CommandWrapper wrapper, public static CommandSource fullEntryFrom(final CommandWrapper wrapper, final JsonCommand command, final AppUser maker) {
final JsonCommand command, final AppUser maker) { return new CommandSource(wrapper.actionName(), wrapper.entityName(), wrapper.getHref(), command.entityId(), command.subentityId(),
return new CommandSource(wrapper.actionName(), wrapper.entityName(),
wrapper.getHref(), command.entityId(), command.subentityId(),
command.json(), maker, DateTime.now()); command.json(), maker, DateTime.now());
} }
@@ -98,10 +95,8 @@ public class CommandSource extends AbstractPersistable<Long> {
// //
} }
private CommandSource(final String actionName, final String entityName, private CommandSource(final String actionName, final String entityName, final String href, final Long resourceId,
final String href, final Long resourceId, final Long subresourceId, final Long subresourceId, final String commandSerializedAsJson, final AppUser maker, final DateTime madeOnDateTime) {
final String commandSerializedAsJson, final AppUser maker,
final DateTime madeOnDateTime) {
this.actionName = actionName; this.actionName = actionName;
this.entityName = entityName; this.entityName = entityName;
this.resourceGetUrl = href; this.resourceGetUrl = href;
@@ -110,16 +105,13 @@ public class CommandSource extends AbstractPersistable<Long> {
this.commandAsJson = commandSerializedAsJson; this.commandAsJson = commandSerializedAsJson;
this.maker = maker; this.maker = maker;
this.madeOnDate = madeOnDateTime.toDate(); this.madeOnDate = madeOnDateTime.toDate();
this.processingResult = CommandProcessingResultType.PROCESSED this.processingResult = CommandProcessingResultType.PROCESSED.getValue();
.getValue();
} }
public void markAsChecked(final AppUser checker, public void markAsChecked(final AppUser checker, final DateTime checkedOnDate) {
final DateTime checkedOnDate) {
this.checker = checker; this.checker = checker;
this.checkedOnDate = checkedOnDate.toDate(); this.checkedOnDate = checkedOnDate.toDate();
this.processingResult = CommandProcessingResultType.PROCESSED this.processingResult = CommandProcessingResultType.PROCESSED.getValue();
.getValue();
} }
public void updateResourceId(final Long resourceId) { public void updateResourceId(final Long resourceId) {
@@ -171,21 +163,16 @@ public class CommandSource extends AbstractPersistable<Long> {
} }
public void markAsAwaitingApproval() { public void markAsAwaitingApproval() {
this.processingResult = CommandProcessingResultType.AWAITING_APPROVAL this.processingResult = CommandProcessingResultType.AWAITING_APPROVAL.getValue();
.getValue();
} }
public boolean isMarkedAsAwaitingApproval() { public boolean isMarkedAsAwaitingApproval() {
if (this.processingResult if (this.processingResult.equals(CommandProcessingResultType.AWAITING_APPROVAL.getValue())) return true;
.equals(CommandProcessingResultType.AWAITING_APPROVAL
.getValue()))
return true;
return false; return false;
} }
public void updateForAudit(final Long officeId, final Long groupId, public void updateForAudit(final Long officeId, final Long groupId, final Long clientId, final Long loanId, final Long savingsId) {
final Long clientId, final Long loanId, final Long savingsId) {
this.officeId = officeId; this.officeId = officeId;
this.groupId = groupId; this.groupId = groupId;
this.clientId = clientId; this.clientId = clientId;
@@ -468,7 +468,7 @@ public class CommandWrapper {
return this.entityName.equalsIgnoreCase("GROUP"); return this.entityName.equalsIgnoreCase("GROUP");
} }
public boolean isCollectionSheetResource(){ public boolean isCollectionSheetResource() {
return this.entityName.equals("COLLECTIONSHEET"); return this.entityName.equals("COLLECTIONSHEET");
} }