Accenture interview question

How to implement sharing through hibernate?