What is the best way to determine if a Transfer Object is populated or is new object?

What is the best way to determine if a Transfer Object is populated or is new object?

getIsPersisted() tells you if the object came from, or has been stored (persisted) in the database.

getIsDirty() tells you if the object has changed since it was last committed, OR if it was never committed in the first place.

Generally, you only ever need check getIsPersisted(). More details can be seen at Generated Methods.