-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Evaluate both "is" and "get" prefix for boolean getters, Fix #60
- Loading branch information
Showing
2 changed files
with
90 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...fieldgenerator-test/src/main/java/com/speedment/jpastreamer/fieldgenerator/test/User.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.speedment.jpastreamer.fieldgenerator.test; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
public class User { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "user_id", nullable = false, unique = true, updatable = false, columnDefinition = "smallint(5)") | ||
private int userId; | ||
|
||
@Column(name = "name", nullable = false, columnDefinition = "varchar(255)") | ||
private String name; | ||
|
||
private boolean member; | ||
|
||
private boolean large; | ||
|
||
public int getUserId() { | ||
return userId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
// Use "get" rather than "is" | ||
public boolean getMember() { | ||
return member; | ||
} | ||
|
||
// Use "is" rather than "get" | ||
public boolean isLarge() { | ||
return member; | ||
} | ||
|
||
} |