org.datanucleus.store.json
Class JSONUtils

java.lang.Object
  extended by org.datanucleus.store.json.JSONUtils

public class JSONUtils
extends java.lang.Object

Convenience methods for JSON.


Constructor Summary
JSONUtils()
           
 
Method Summary
static java.lang.String getMemberNameForDatastoreIdentity(org.datanucleus.metadata.AbstractClassMetaData cmd)
          Method to return the member name to be used by JSON for the datastore identity of the object.
static java.lang.String getMemberNameForMember(org.datanucleus.metadata.AbstractMemberMetaData mmd)
          Method to return the member name to use in JSON.
static java.lang.String getMemberNameForVersion(org.datanucleus.metadata.VersionMetaData vermd)
          Method to return the member name to be used by JSON for the version of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONUtils

public JSONUtils()
Method Detail

getMemberNameForMember

public static java.lang.String getMemberNameForMember(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Method to return the member name to use in JSON. Uses the column name if provided, otherwise the member name from the class.

Parameters:
mmd - Metadata for the member
Returns:
The JSON member name

getMemberNameForDatastoreIdentity

public static java.lang.String getMemberNameForDatastoreIdentity(org.datanucleus.metadata.AbstractClassMetaData cmd)
Method to return the member name to be used by JSON for the datastore identity of the object.

Parameters:
cmd - Metadata for the class
Returns:
The member name for the (datastore) identity

getMemberNameForVersion

public static java.lang.String getMemberNameForVersion(org.datanucleus.metadata.VersionMetaData vermd)
Method to return the member name to be used by JSON for the version of the object.

Parameters:
vermd - Version metadata
Returns:
The member name


Copyright © 2012. All Rights Reserved.