public class JSONObjectInfo
extends java.lang.Object
Constructor and Description |
---|
JSONObjectInfo(java.lang.String relationPropName,
java.lang.String objectName,
boolean multiple,
boolean arrayUnit,
boolean optimize)
Constructor will be called on Resource generation
|
Modifier and Type | Method and Description |
---|---|
void |
addID()
Adds JSON object id.
|
void |
addProperty(java.lang.String mappedName,
JSONPropertyInfo jsonProp)
Adds new property info.
|
void |
addRelatedChild(java.lang.String relationName,
JSONObjectInfo jsonObj)
Adds child object info to hierarchy.
|
java.util.Map<java.lang.String,JSONPropertyInfo> |
getAttrToPropMap()
Returns attribute to property mapping.
|
java.util.List<JSONObjectInfo> |
getChildren()
Returns a List of JSONObjectInfo objects which are children to the current
JSONObjectInfo object
|
java.util.Map<java.lang.String,JSONObjectInfo> |
getChildrenMap()
Returns children object map.
|
java.lang.String |
getHierarchyPath()
Returns object hierarchy path.
|
java.lang.String |
getHPath()
Returns relation property hPath.
|
java.lang.String |
getObjectName()
Returns object name.
|
java.lang.String |
getParentObjectName()
Returns parent object name.
|
java.util.Map<java.lang.String,JSONPropertyInfo> |
getPropertyMap()
Returns property map.
|
java.util.Map<java.lang.String,JSONPropertyInfo> |
getPropToAttrMap()
Returns property to attribute mapping.
|
java.lang.String |
getRelationPropName()
Returns relation property name.
|
void |
idAdded()
Sets to true if id added
|
boolean |
isArrayUnit()
Is array unit.
|
boolean |
isIdAdded()
Is id added to object info
|
boolean |
isMerged()
Is object info merged
|
boolean |
isMultiple()
Is multiple.
|
boolean |
isRootObject()
Is object a root object.
|
boolean |
isWrapper()
Is object a wrapper object (no attributes).
|
void |
setMerged()
Set merged object info
|
void |
setObjectName(java.lang.String useObject)
Set object name
|
public JSONObjectInfo(java.lang.String relationPropName, java.lang.String objectName, boolean multiple, boolean arrayUnit, boolean optimize)
relationPropName
- property namemultiple
- is multiplearrayUnit
- is array listoptimize
- optimize resourcepublic void addID()
public boolean isRootObject()
public boolean isArrayUnit()
public boolean isMultiple()
public boolean isWrapper()
public java.lang.String getRelationPropName()
public java.lang.String getObjectName()
public java.lang.String getHPath()
public java.lang.String getHierarchyPath()
public java.lang.String getParentObjectName()
public void addProperty(java.lang.String mappedName, JSONPropertyInfo jsonProp)
mappedName
- resolved object namejsonProp
- JSONPropertyInfo objectpublic void addRelatedChild(java.lang.String relationName, JSONObjectInfo jsonObj)
relationName
- relationshipjsonObj
- child JSONObjectInfo objectpublic java.util.Map<java.lang.String,JSONPropertyInfo> getPropertyMap()
public java.util.Map<java.lang.String,JSONPropertyInfo> getAttrToPropMap()
public java.util.Map<java.lang.String,JSONPropertyInfo> getPropToAttrMap()
public java.util.Map<java.lang.String,JSONObjectInfo> getChildrenMap()
public java.util.List<JSONObjectInfo> getChildren()
public void setMerged()
public boolean isMerged()
public void idAdded()
public boolean isIdAdded()
public void setObjectName(java.lang.String useObject)
useObject
- object name