I have a java class hierarchy as follows.
public class Results{
private String _query;
private CachedRowSetImpl _resultSet;
//... getter setters
}
I've serialized List<Results> resultList, consider this List contains 100 items and each _resultSet having more than 1000 records. I have 2 questions,
_resultSet being deserialized meaning just query is enough?Correct me, if my understanding is wrong.
If you implement Externalizable,your readExternal will look somewhat like :
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
_query=(String) in.readObject();
if(//yourCondition){
_resultSet=(CachedRowSetImpl) in.readObject();
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With