Top Description Methods
javax.persistence

public @Interface IdClass

extends Annotation
Annotations
@Target:TYPE
@Retention:RUNTIME
Imports
java.lang.annotation.Target, .Retention

Specifies a composite primary key class that is mapped to multiple fields or properties of the entity.

The names of the fields or properties in the primary key class and the primary key fields or properties of the entity must correspond and their types must be the same.


  Example:

  @IdClass(com.acme.EmployeePK.class)
  @Entity
  public class Employee {
     @Id String empName;
     @Id Date birthDay;
     ...
  }
Since
Java Persistence 1.0

Method Summary

Modifier and TypeMethod and Description
public Class<T>
value()

Primary key class

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public Class<T> value()

Primary key class