MIFOSX-291: fix creation of office. problem with jpa nullable=false being wrong.

This commit is contained in:
Keith Woodlock
2013-04-05 22:16:06 +01:00
parent 4df690b501
commit e0b856ba69
@@ -45,7 +45,7 @@ public class Office extends AbstractPersistable<Long> {
@Column(name = "name", nullable = false, length = 100) @Column(name = "name", nullable = false, length = 100)
private String name; private String name;
@Column(name = "hierarchy", nullable = false, length = 50) @Column(name = "hierarchy", nullable = true, length = 50)
private String hierarchy; private String hierarchy;
@Column(name = "opening_date", nullable = false) @Column(name = "opening_date", nullable = false)
@@ -172,7 +172,7 @@ public class Office extends AbstractPersistable<Long> {
} }
} }
private String hierarchyOf(Long id) { private String hierarchyOf(final Long id) {
return this.hierarchy + id.toString() + "."; return this.hierarchy + id.toString() + ".";
} }
@@ -192,11 +192,11 @@ public class Office extends AbstractPersistable<Long> {
return isParent; return isParent;
} }
public boolean doesNotHaveAnOfficeInHierarchyWithId(Long officeId) { public boolean doesNotHaveAnOfficeInHierarchyWithId(final Long officeId) {
return !this.hasAnOfficeInHierarchyWithId(officeId); return !this.hasAnOfficeInHierarchyWithId(officeId);
} }
private boolean hasAnOfficeInHierarchyWithId(Long officeId) { private boolean hasAnOfficeInHierarchyWithId(final Long officeId) {
boolean match = false; boolean match = false;