public MrpLineOrigin copyMrpLineOrigin(MrpLineOrigin mrpLineOrigin) {

    MrpLineOrigin copyMrpLineOrigin = new MrpLineOrigin();
    copyMrpLineOrigin.setRelatedToSelect(mrpLineOrigin.getRelatedToSelect());
    copyMrpLineOrigin.setRelatedToSelectId(mrpLineOrigin.getRelatedToSelectId());

    return copyMrpLineOrigin;
  }
  public MrpLineOrigin createMrpLineOrigin(Model model) {

    Class<?> klass = model.getClass();
    if (model instanceof HibernateProxy) {
      klass = ((HibernateProxy) model).getHibernateLazyInitializer().getPersistentClass();
    }

    MrpLineOrigin mrpLineOrigin = new MrpLineOrigin();
    mrpLineOrigin.setRelatedToSelect(klass.getCanonicalName());
    mrpLineOrigin.setRelatedToSelectId(model.getId());

    return mrpLineOrigin;
  }