Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private def validate(entity: CostCenter): List[String] = {
- //var vomit, and why do I need to use .::() instead of just ::?
- var conflicts: List[String] = List[String]()
- if(entity.getName == null)
- conflicts = conflicts.::("A Costcenter must have a Name. ")
- if(entity.getCode == null)
- conflicts = conflicts.::("A Costcenter must have a Code. ")
- if(entity.hasDepth) conflicts = conflicts.::("A Costcenter must have a Depth. ")
- if(entity.hasCategory) conflicts = conflicts.::("A Costcenter must have a Category. ")
- conflicts
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement