Tag: Reflection

Determining the primary key value of an entity bean using reflection

Determining the primary key value of an entity bean using reflection

Given some Entity Object or generic type T, it may be useful to determine the value of the primary key without knowing the object type.

Determining the primary key property name of an entity bean using reflection

Determining the primary key property name of an entity bean using reflection

The name of the property that represents the primary key of an Entity Bean can be determined using reflection as follows: To get the actual value see this tutorial