Please review the following class
Code:
@Entity
@Table(name="CUSTOMER")
public class Customer {
@Column(name="NAME")
public String getName() { return name; }
@Column(name="ADDRESS")
public String getAddress() { return address; }
/* select company_name from company_master c, associated_member a where
* c.company_code = a.company_code and c.employee = %NAME%
*/
public String getCompanyName {
}
}
Is there any JPA annotation that would allow me to define a custom query just for the above getter method, getCompanyName()? What would be the best solution for this scenario?