开发者

How to create persistent object in Java

开发者 https://www.devze.com 2023-01-20 21:35 出处:网络
Can you give me an example of creati开发者_StackOverflow社区ng persistent object in Java. thanks public class MyClass implements SerializableDepending on where you want to persist the object, take a l

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
0

精彩评论

暂无评论...
验证码 换一张
取 消