I try to write if else condition on Entity class but when i run tomcat it's not working. It have an error. I curious to know how to write if else condition in spring roo project? And which file i can write that?
i try to test condition by write:(in Student.java)
9 @RooJavaBean
10 @RooToString
11 @RooJpaActiveRecord
12 public class Student {
13 private long id;
14 private String name;
15 private Integer age;
16 if(true){} //test if condition
And this's errors when i run tomcat.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project tap: Compilation failure: Compilation failure:
[ERROR] Employee.java:[22,1] illegal start of type
[ERROR] Employee.java:[22,4] illegal start of type
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.