How to create persistent object in Java
Can you give me an example of creati开发者_StackOverflow社区ng persistent object in Java. thanks
public class MyClass implements Serializable
Depending on where you want to persist the object, take a look at:
- JPA, for relational database
- JDO (Java Data Objects, a more general persistence mechanism)
- JAXB - XML serialization
java.io.Serializable
or protobuf - binary serialization
精彩评论