diff --git a/mifosng-provider/src/main/java/org/mifosplatform/organisation/office/domain/Office.java b/mifosng-provider/src/main/java/org/mifosplatform/organisation/office/domain/Office.java index 609927989..4d84c2807 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/organisation/office/domain/Office.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/organisation/office/domain/Office.java @@ -45,7 +45,7 @@ public class Office extends AbstractPersistable { @Column(name = "name", nullable = false, length = 100) private String name; - @Column(name = "hierarchy", nullable = false, length = 50) + @Column(name = "hierarchy", nullable = true, length = 50) private String hierarchy; @Column(name = "opening_date", nullable = false) @@ -172,7 +172,7 @@ public class Office extends AbstractPersistable { } } - private String hierarchyOf(Long id) { + private String hierarchyOf(final Long id) { return this.hierarchy + id.toString() + "."; } @@ -192,11 +192,11 @@ public class Office extends AbstractPersistable { return isParent; } - public boolean doesNotHaveAnOfficeInHierarchyWithId(Long officeId) { + public boolean doesNotHaveAnOfficeInHierarchyWithId(final Long officeId) { return !this.hasAnOfficeInHierarchyWithId(officeId); } - private boolean hasAnOfficeInHierarchyWithId(Long officeId) { + private boolean hasAnOfficeInHierarchyWithId(final Long officeId) { boolean match = false;