i'm using jdbc to work with my db.
I want to store a HashMap directly in the db, oracle.
i figure i need to serialize the Map, and its contents, which are only String.
Map already implements Serializeable, but my question is how do i put the Map in the SQL using jdbc?
for instance, i have a jdbcTemplate.update("insert into ....", new Obj...
Howdie!
So I'm deserializing a class called Method using .NET Serialization. Method contains a list of objects implementing IAction. I originally used the [XmlInclude] attribute to specify all classes which implement IAction.
But now, I'd like to change my program to load all dlls in a directory and strip out the classes which impleme...
In Jackrabbit I have experienced two ways to save my POJOs into repository nodes for storage in the Jackrabbit JCR:
writing my own layer
and
using Apache Graffito
Writing my own code has proven time consuming and labor intensive (had to write and run a lot of ugly automated tests) though quite flexible.
Using Graffito has been a...
I'm learning C# by writing a home library manager.
I have a BookController that will store the books in a data structure and perform operations on them.
Does C# have a way of saving the data in the dictionary to a local file perhaps in an XML fashion to load later, or am I going to have to write it myself?
What is the best method of s...
I'd like a C library that can serialize my data structures to disk, and then load them again later. It should accept arbitrarily nested structures, possibly with circular references.
I presume that this tool would need a configuration file describing my data structures. The library is allowed to use code generation, although I'm fairly ...
I've recently found out about protocol buffers and was wondering if they could be applied to my specific problem.
Basically I have some CSV data that I need to convert to a more compact format for storage as some of the files are several gig.
Each field in the CSV has a header, and there are only two types, strings and decimals (becau...
I have a HashMap that I am serializing and deserializing to an Oracle db, in a BLOB data type field.
I want to perform a query, using this field.
Example, the application will make a new HashMap, and have some key-value pairs.
I want to query the db to see if a HashMap with this data already exists in the db.
I do not know how to do thi...
I need to keep a couple of [Jena] Models (OntModels, specifically) synchronized across a socket, and I'd like to do this one change at a time (for various reasons -- one being that each Statement added or removed from the OntModels is also adapting a JESS rule base.). I am able to listen to the add/remove events on the OntModels and the...
I'm a student currently dabbling in a .Net n-tier app that uses Nhibernate+WCF+WPF.
One of the things that is done quite terribly is object graph serialisation, In fact it isn't done at all, currently associations are ignored and we are using DTOs everywhere.
As far as I can tell one method to proceed is to predefine which objects and ...
Hello Everybody,
just a simple question. Is there an attribute to skip empty arrays in the xml-serialization of c#? This would increase human-readability of the xml-output.
Thanks in advance
Matze
...
I want to write an Exception to an MS Message Queue. When I attempt it I get an exception. So I tried simplifying it by using the XmlSerializer which still raises an exception, but it gave me a bit more info:
{"There was an error reflecting type
'System.Exception'."}
with InnerException:
{"Cannot serialize member
System.Ex...
I am doing some significant refactoring and feature-adding on a project, and have just broken backwards compatibility with my data. I did it by creating a bunch of subclasses from the class that I used to house my data in, and loading in old serialized objects no longer works..
What kind of pre-engineering or strategies do you employ to...
I need to serialize/de-serialize some objects into/from string and transfer them as just opaque data. I can use XmlSerializer to do it, but generated string looks clumsy and long. So, is there any concise Serializer available in .NET?
The first thing coming to my mind is that perhaps .NET should have JSON Serializer, but I cannot find i...
Exact Duplicate of: http://stackoverflow.com/questions/390800/is-there-a-way-to-do-object-with-its-attributes-serializing-to-xml
Quite Ironically, it's a duplicate of the poster's previous question.
I want create an object, it contains some Validate application block attributes like:
[Serializable]
public class FormElement:IValid...
I can easily define a datatype for a node of a directed graph.
data Node = Node String [Node] derving (Show, Read)
I can save the graph to a file using show function, then restore it using read. However, show will not cope with a cycle. Is there a trivial way to save and restore a graph?
...
Hi,
I have a service that returns a collection of MyClass objects.
If all of the MyClass instances have null in MyClass2Reference then everything works fine.
Otherwise, I get a "Connection reset" error on the client side.
What am I doing wrong?
Nevrmind: was a problem with NHibernate lazy proxy objects.
[DataContract]
public MyClass
{...
Currently, I only know a way of doing RPC for POJOs in Java, and is with the very complex EJB/JBoss solution.
Is there any better way of providing a similar functionality with a thiner layer (within or without a Java EE container), using RMI or something that can serialize and send full blown objects over the wire?
I'm not currently i...
All I am trying to do is
XmlSerializer serializer = new XmlSerializer(typeof(Stack<int>));
and I get the following at runtime:
System.InvalidOperationException: You must implement a default accessor on
System.Collections.Generic.Stack`1 [[System.Int32, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]] b...
Is there a general consensus out there for when working with library's that call stored procedures? Return datasets or use sqldatareader to populate custom objects?
Is the cost of serialization your Data Transport Object less then a DataSet?
...
I miss the .Net remoting days when I could just send an object over the wire and it would work on both sides of the middle layer without much work. Here's why:
I've been given an assignment. I'm building a Logic/Data Abstraction layer (stupid PCI Compliance) so that we can move our database servers off of the corporate network into a pr...