What you describe is called Active Record pattern. See the article and google for it, then you'll find sample implementations which you can adapt for your scenario. It is basically a Repository pattern implemented in the entity itself.
Active Record is strong in some scenarios, it's the default for Ruby on Rails applications iirc, but it does have its downsides. I suggest you look them up and think about it again. Maybe your domain suits a classical domain model with persistence ignorance (like Hibernate offers) better.
See also this website here for a comparison.