org.datanucleus.store.json
Class JsonPersistenceHandler

java.lang.Object
  extended by org.datanucleus.store.AbstractPersistenceHandler
      extended by org.datanucleus.store.json.JsonPersistenceHandler
All Implemented Interfaces:
org.datanucleus.store.StorePersistenceHandler
Direct Known Subclasses:
CloudStoragePersistenceHandler

public class JsonPersistenceHandler
extends org.datanucleus.store.AbstractPersistenceHandler


Field Summary
protected static org.datanucleus.util.Localiser LOCALISER
          Localiser for messages.
protected  org.datanucleus.store.AbstractStoreManager storeMgr
           
 
Method Summary
 void close()
           
 void deleteObject(org.datanucleus.store.ObjectProvider op)
           
 void fetchObject(org.datanucleus.store.ObjectProvider op, int[] fieldNumbers)
           
 java.lang.Object findObject(org.datanucleus.store.ExecutionContext ec, java.lang.Object id)
           
protected  java.util.Map<java.lang.String,java.lang.String> getHeaders(java.lang.String httpVerb, java.util.Map<java.lang.String,java.lang.String> options)
           
 java.util.List getObjectsOfCandidateType(org.datanucleus.store.ExecutionContext ec, org.datanucleus.store.connection.ManagedConnection mconn, java.lang.Class candidateClass, boolean subclasses, boolean ignoreCache, java.util.Map options)
          Convenience method to get all objects of the candidate type from the specified connection.
 java.lang.String getURLPath(org.datanucleus.metadata.AbstractClassMetaData acmd)
           
 java.lang.String getURLPath(org.datanucleus.store.ObjectProvider op)
           
 java.lang.String getURLPathForQuery(org.datanucleus.metadata.AbstractClassMetaData acmd)
           
protected  void handleHTTPErrorCode(java.net.HttpURLConnection http)
           
 void insertObject(org.datanucleus.store.ObjectProvider op)
           
 void locateObject(org.datanucleus.store.ObjectProvider op)
           
protected  JSONObject read(java.lang.String method, java.lang.String requestUri, java.net.URLConnection conn, java.util.Map headers)
           
 void updateObject(org.datanucleus.store.ObjectProvider op, int[] fieldNumbers)
           
protected  void write(java.lang.String method, java.lang.String requestUri, java.net.URLConnection conn, JSONObject jsonobj, java.util.Map<java.lang.String,java.lang.String> headers)
           
 
Methods inherited from class org.datanucleus.store.AbstractPersistenceHandler
batchEnd, batchStart, deleteObjects, findObjects, insertObjects, locateObjects, useReferentialIntegrity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final org.datanucleus.util.Localiser LOCALISER
Localiser for messages.


storeMgr

protected org.datanucleus.store.AbstractStoreManager storeMgr
Method Detail

close

public void close()

insertObject

public void insertObject(org.datanucleus.store.ObjectProvider op)

updateObject

public void updateObject(org.datanucleus.store.ObjectProvider op,
                         int[] fieldNumbers)

deleteObject

public void deleteObject(org.datanucleus.store.ObjectProvider op)

fetchObject

public void fetchObject(org.datanucleus.store.ObjectProvider op,
                        int[] fieldNumbers)

findObject

public java.lang.Object findObject(org.datanucleus.store.ExecutionContext ec,
                                   java.lang.Object id)

locateObject

public void locateObject(org.datanucleus.store.ObjectProvider op)

write

protected void write(java.lang.String method,
                     java.lang.String requestUri,
                     java.net.URLConnection conn,
                     JSONObject jsonobj,
                     java.util.Map<java.lang.String,java.lang.String> headers)

read

protected JSONObject read(java.lang.String method,
                          java.lang.String requestUri,
                          java.net.URLConnection conn,
                          java.util.Map headers)

getHeaders

protected java.util.Map<java.lang.String,java.lang.String> getHeaders(java.lang.String httpVerb,
                                                                      java.util.Map<java.lang.String,java.lang.String> options)

getObjectsOfCandidateType

public java.util.List getObjectsOfCandidateType(org.datanucleus.store.ExecutionContext ec,
                                                org.datanucleus.store.connection.ManagedConnection mconn,
                                                java.lang.Class candidateClass,
                                                boolean subclasses,
                                                boolean ignoreCache,
                                                java.util.Map options)
Convenience method to get all objects of the candidate type from the specified connection.

Parameters:
mconn - Managed Connection
candidateClass - Candidate
subclasses - Whether to include subclasses
ignoreCache - Whether to ignore the cache
om - ObjectManager
Returns:
List of objects of the candidate type

getURLPath

public java.lang.String getURLPath(org.datanucleus.store.ObjectProvider op)

getURLPath

public java.lang.String getURLPath(org.datanucleus.metadata.AbstractClassMetaData acmd)

getURLPathForQuery

public java.lang.String getURLPathForQuery(org.datanucleus.metadata.AbstractClassMetaData acmd)

handleHTTPErrorCode

protected void handleHTTPErrorCode(java.net.HttpURLConnection http)
                            throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2012. All Rights Reserved.