Hi, Do you want to have the following methods support JSON value (i.e. the value is a JSON string)?
> void addEntry(String key, String value) throws DuplicateEntryException; > void updateEntry(String key, String value) throws EntryNotFoundException; We have the JSON data binding. Maybe you can use org.json.JSONObject as the argument type so that the JSON data binding can introspect them as the JSON data binding. Thanks, Raymond ________________________________________________________________ Raymond Feng rf...@apache.org Apache Tuscany PMC member and committer: tuscany.apache.org Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com Personal Web Site: www.enjoyjava.com ________________________________________________________________ On Jul 25, 2011, at 11:35 AM, Eranda Sooriyabandara wrote: > Hi devs, > I am creating a NoSQL datastore component for some NoSQL databases. > Here I used my own API to generalize all the databases. In my datastore there > are 4 interfaces as follows(with method signatures), > 1. SessionFactory - Manage sessions > > 2. Session - Manage Databases > Database createDatabase(String databaseName) throws SessionException; > Database getDatabase(String databaseName) throws SessionException; > void deleteDatabase(String databaseName) throws DatabaseNotFoundException, > SessionException; > 3. Database - Manage Groups > Group createGroup(String groupId); > Group getGroup(String groupId); > void deleteGroup(String groupId) throws GroupNotFoundException; > 4. Group - Manage entries (Actual data to be stored) > void addEntry(String key, String value) throws DuplicateEntryException; > void updateEntry(String key, String value) throws EntryNotFoundException; > void deleteEntry(String key) throws EntryNotFoundException; > String getEntry(String key) throws EntryNotFoundException; > In the implementation each instance call others constructor. That means, > createDatabase call the Database Implementations constructor. > > Here I want to create a component which used json as the data representation. > I am bit confused with building the relationship between the above four > interfaces since each interface use to get an object of the other class. If > you can help me with some ideas to make this a SCA component that would be > great. > > You can find my works on [1]. > > thanks > > -- > Eranda Sooriyabandara > Blog: http://www.emsooriyabandara.blogspot.com/ > LInkedIn: http://lk.linkedin.com/in/erandasooriyabandara > > [1]. https://svn.apache.org/repos/asf/tuscany/collaboration/GSoC-2011-Eranda/ >