There are two ways to add the condition/where clause into the annotation class
1) at the class level
2) at the field method or field declaration
@Entity
@Table(name = "TBLM_PACKAGE")
@Where(clause = "PACKAGE_MODE!='DESIGN'")
public class PkgData{
private String packageMode;
@Column(name = "PACKAGE_MODE")
public String getPackageMode() {
return packageMode;
}
public void setPackageMode(String packageMode) {
this.packageMode = packageMode;
}
}
1) at the class level
2) at the field method or field declaration
@Entity
@Table(name = "TBLM_PACKAGE")
@Where(clause = "PACKAGE_MODE!='DESIGN'")
public class PkgData{
private String packageMode;
@Column(name = "PACKAGE_MODE")
public String getPackageMode() {
return packageMode;
}
public void setPackageMode(String packageMode) {
this.packageMode = packageMode;
}
}
No comments:
Post a Comment