Just example of xml file will be enough)
OR
Can Hibernate load needed entity(all records) at the starting of application and store it in memory for quick access?
Just example of xml file will be enough)
OR
Can Hibernate load needed entity(all records) at the starting of application and store it in memory for quick access?
(...) I just wanna know how to tell Hibernate that is HEAP.
This part is still unclear. Unless you want Hibernate to generate this table (which is AFAIK not possible), you shouldn't have to tell Hibernate that the table is a HEAP table. Just map your entity, create and load the table before to start your application and see what happens.
Can Hibernate load needed entity (all records) at the starting of application and store it in memory for quick access?
You could use second level caching (with query caching depending on how you access the entities) to achieve something approaching. Caching entities in the second level cache won't load them at startup, you ill have to write some custom code for that, but you will avoid database hits. This works particularly well with read-only entities (like reference data such as countries, currencies, etc).