Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

KotlinBuilder generated by omitting the fields of the super class. #21

@NohYooHan

Description

@NohYooHan

ex)
models

abstract class Audit(
    val createdBy: String = "", val createdAt: OffsetDateTime = OffsetDateTime.now(),
    val lastModifiedBy: String = "", val lastModifiedAt: OffsetDateTime = OffsetDateTime.now()
) : Serializable

@KotlinBuilder
data class UserGroup(
    val id: Long = -1,
    val name: String = "",
    val roles: List<Role> = emptyList()
) : Audit()

generated builder class

package com.kakao.mail.gateman.common.model;

import java.lang.String;
import java.util.List;

public final class UserGroupBuilder {
  private long id;

  private String name;

  private List<Role> roles;

  public UserGroupBuilder setId(long id) {
    this.id = id;
    return this;
  }

  public UserGroupBuilder setName(String name) {
    this.name = name;
    return this;
  }

  public UserGroupBuilder setRoles(List<Role> roles) {
    this.roles = roles;
    return this;
  }

  public UserGroup create() {
    return new UserGroup(id, name, roles);
  }

  public static UserGroupBuilder builder() {
    return new UserGroupBuilder();
  }
}

Therefore, it is impossible to map the suepr class field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions