当前位置:网站首页>@Accessors annotation function specifies that the prefix follows the hump naming
@Accessors annotation function specifies that the prefix follows the hump naming
2022-07-03 03:12:00 【Friendship years】
Accessors Translation is accessor . With this annotation you can control getter and setter The form of the method .
@Accessors(fluent = true)
Use fluent attribute ,getter and setter Method names are property names , And setter Method returns the current object
@Data
@Accessors(fluent = true)
class User {
private Integer id;
private String name;
// Generated getter and setter The method is as follows , Method brief
public Integer id(){}
public User id(Integer id){}
public String name(){}
public User name(String name){}
}
@Accessors(chain = true)
Use chain attribute ,setter Method returns the current object
@Data
@Accessors(chain = true)
class User {
private Integer id;
private String name;
// Generated setter The method is as follows , Method brief
public User setId(Integer id){}
public User setName(String name){}
}
@Accessors(prefix = “f”)
Use prefix attribute ,getter and setter Method ignores the specified prefix of the property name ( Follow the hump name )
@Data
@Accessors(prefix = "f")
class User {
private Integer fId;
private String fName;
// Generated getter and setter The method is as follows , Method brief
public Integer id(){}
public void id(Integer id){}
public String name(){}
public void name(String name){}
}
边栏推荐
- Variable declarations following if statements
- [shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling
- 45 lectures on MySQL [index]
- How to make backgroundworker return an object
- Spark on yarn资源优化思路笔记
- Reset or clear NET MemoryStream - Reset or Clear . NET MemoryStream
- Add automatic model generation function to hade
- 后管中编辑与预览获取表单的值写法
- TCP handshake three times and wave four times. Why does TCP need handshake three times and wave four times? TCP connection establishes a failure processing mechanism
- Practice of traffic recording and playback in vivo
猜你喜欢
![MySQL practice 45 [global lock and table lock]](/img/23/fd58c185ae49ed6c04f1a696f10ff4.png)
MySQL practice 45 [global lock and table lock]

vfork执行时出现Segmentation fault

MySql实战45讲【全局锁和表锁】

Unity3d RPG implementation (medium)
![45 lectures on MySQL [index]](/img/f6/70be00028908cbd9ed7f2c77687cee.png)
45 lectures on MySQL [index]

I2C subsystem (IV): I2C debug

I2C 子系統(四):I2C debug

docker安装mysql
![[error record] the parameter 'can't have a value of' null 'because of its type, but the im](/img/1c/46d951e2d0193999f35f14d18a2de0.jpg)
[error record] the parameter 'can't have a value of' null 'because of its type, but the im

Do you really understand relays?
随机推荐
Joking about Domain Driven Design (III) -- Dilemma
[leectode 2022.2.15] lucky numbers in the matrix
idea 加载不了应用市场解决办法(亲测)
MySql实战45讲【SQL查询和更新执行流程】
左连接,内连接
I2C 子系统(四):I2C debug
I2C subsystem (I): I2C spec
BigVision代码
[algebraic structure] group (definition of group | basic properties of group | proof method of group | commutative group)
I2C 子系统(二):I3C spec
yii2 中andWhere多个or查询 orm条件
Creation and destruction of function stack frame
Segmentation fault occurs during VFORK execution
复选框的使用:全选,全不选,选一部分
[Chongqing Guangdong education] cultural and natural heritage reference materials of China University of Geosciences (Wuhan)
[combinatorics] Application of exponential generating function (multiple set arrangement problem | different balls in different boxes | derivation of exponential generating function of odd / even sequ
L'index des paramètres d'erreur est sorti de la plage pour les requêtes floues (1 > Nombre de paramètres, qui est 0)
Vs 2019 configuration du moteur de génération de tensorrt
[pyg] understand the messagepassing process, GCN demo details
Process the dataset and use labelencoder to convert all IDs to start from 0