Dynamic Java model based on implementation using HashMap