Java Learning - how to manage identity data