All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dreamroute.basic.bdfint.domain.BaseDomain Maven / Gradle / Ivy

There is a newer version: 1.9.29-RELEASE
Show newest version
package com.github.dreamroute.basic.bdfint.domain;

import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 

@author w.dehai * *

Description: 基础实体类,几乎所有实力均需要继承自此 *

对lombok注解的说明: *

    *
  1. @Data = {@Getter, @Setter, toString} *
  2. @EqualsAndHashCode(onlyExplicitlyIncluded = true)表名只针对@EqualsAndHashCode.Include标记的字段生效 *
  3. 在id字段上标记@EqualsAndHashCode.Include,表示实体对象的equals方法和hashCode方法只与主键id相关,与其他字段无关 *
  4. 业务实体需要继此类 *
  5. 业务实体需要如下使用注解(定义实体时请复制下列注解),参考(Demo.java)生成的equals和hashCode方法才只与id相关 *
     *      @Data
     *      @SuperBuilder
     *      @NoArgsConstructor
     *      @AllArgsConstructor
     *      @Table(name = "表名")
     *      @EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
     *  
    *
* */ @SuperBuilder @NoArgsConstructor public class BaseDomain extends MetaInfo {}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy