# Id Methods

Entities generally have an Id class created for them by the artifact generator. This provides clarity in the application code as to what kind of Id is being held or passed. Likewise, there are useful methods on these Id classes. Id instances are immutable.

- `getEntity()`- Get the business entity that this Id refers to or null if no such entity instance exists.
- `getFoo()`- In the case where the Id contains a persistent entity `foo`, return that entity.
- `getBarId()`- Get the contained Id referring to the entity `bar`.
- `newDTO()`- Create a new DTO instance with the Id property already set to this Id's value.

Parent topic: Business Entity Public Methods