This method is too big. It might be more clean to create 3 subclasses (StartFrame, TargetFrame, EndFrame), which each set the correct values for them in the initializer. Overridden with values given as arguments to the constructor. Then you can also do class-specific fields and validations, like only StartFrame has a "start" field, and only StartFrame validates it. With single-table-inheritance, this can all go into the same database table with almost or exactly the same structure.