Is there any way to serialize an ORMLite prepared query and then deserialize to restore it to the original form?
Right now the answer is no and I don't think there is any way for the code to be changed to support it. A prepared query contains points to the DAO, to the internal connection source classes, etc. so it can perform its duties. There is no easy way to serialize all that information at this time.
Serializing them is not a problem because there is PreparedStmt.getStatement() but I have not found any way to reverse the process.
By reverse the process you mean generate a PreparedStmt
from the query string? You should be able to do:
GenericRawResults<T> results = dao.QueryRaw(queryString, dao.getRawRowMapper());