我现在试图弄清楚这段代码大约两个小时,例如在下面的课程中,这些字段代表什么?
import java.util.Date;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
import java.util.UUID;
@StaticMetamodel(Address.class)
public class Address_ extends {
public static volatile SingularAttribute<Address, Long> id;
public static volatile SingularAttribute<Address, UUID> personId;
public static volatile SingularAttribute<Address, Person> person;
}
这Address.class
是一个具有以下定义的java类:
@Entity
@Table(name = "address", schema = "public")
public class Address{
private Long id;
private Person person;
private UUID personId;
//....
}
请您解释一下@StaticMetamodel
和@SingularAttribute
注释的用途是什么?这可能很简单,但我无法理解。