public static SerializationContext getInstance() {
return instance;
}
private static SerializationContext createInstance() {
DomainMetaData domainMetaData = new DomainMetaData();
// For now we need to mark the Query class as serialized
domainMetaData.addClassType(Query.class, true);
// Some other that need to be serialized
domainMetaData.addClassType(ObjectPageList.class, true);
domainMetaData.addClassType(UserImpl.class, true);
domainMetaData.addClassType(LazyList.class, true);
// Build domain
TypeDomain domain = new TypeDomain(domainMetaData, true);
// Build serialization context