GigaSpaces XAP 9.5 API

org.openspaces.persistency.cassandra.meta.mapping.node
Class SpaceDocumentTypeNode

java.lang.Object
  extended by org.openspaces.persistency.cassandra.meta.mapping.node.AbstractCompoundTypeNode
      extended by org.openspaces.persistency.cassandra.meta.mapping.node.SpaceDocumentTypeNode
All Implemented Interfaces:
CompoundTypeNode, TypeNode
Direct Known Subclasses:
SpaceDocumentTopLevelTypeNode

public class SpaceDocumentTypeNode
extends AbstractCompoundTypeNode

A VirtualEntry based implementation of CompoundTypeNode.

Since:
9.1.1
Author:
Dan Kilman

Field Summary
protected  String fullName
           
protected  String name
           
protected  String typeName
           
 
Constructor Summary
SpaceDocumentTypeNode()
           
SpaceDocumentTypeNode(String typeName, String parentFullName, String name, Map<String,TypeNode> initialChildren, TypeNodeContext context)
           
 
Method Summary
protected  String generateFullName(String parentFullName, String name)
           
protected  String getDynamicHeaderColumnName()
          controls how this type will be read from cassandra, see implementations and SpaceDocumentTopLevelTypeNode.
 String getFullName()
           
 String getName()
           
 Class<?> getType()
           
 String getTypeName()
           
 SpaceDocument readFromColumnFamilyRow(ColumnFamilyRow row, TypeNodeContext context)
          Recursively read the value matching this type node property from the ColumnFamilyRow.
protected  boolean shouldSkipEntryWrite(String key, Object value)
           
protected  void writeToColumnFamilyRowImpl(Object value, ColumnFamilyRow row, TypeNodeContext context)
           
 
Methods inherited from class org.openspaces.persistency.cassandra.meta.mapping.node.AbstractCompoundTypeNode
getAllTypedColumnMetadataChildren, getChildren, writePropertyToColumnFamilyRow, writeToColumnFamilyRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fullName

protected String fullName

name

protected String name

typeName

protected String typeName
Constructor Detail

SpaceDocumentTypeNode

public SpaceDocumentTypeNode()

SpaceDocumentTypeNode

public SpaceDocumentTypeNode(String typeName,
                             String parentFullName,
                             String name,
                             Map<String,TypeNode> initialChildren,
                             TypeNodeContext context)
Method Detail

getName

public String getName()
Returns:
The type node simple property name (without the path).

getFullName

public String getFullName()
Returns:
The type node full name including that path to this this type nodes matching property.

getType

public Class<?> getType()
Returns:
The type of this type nodes matching property.

getTypeName

public String getTypeName()

generateFullName

protected String generateFullName(String parentFullName,
                                  String name)

shouldSkipEntryWrite

protected boolean shouldSkipEntryWrite(String key,
                                       Object value)

getDynamicHeaderColumnName

protected String getDynamicHeaderColumnName()
Description copied from class: AbstractCompoundTypeNode
controls how this type will be read from cassandra, see implementations and SpaceDocumentTopLevelTypeNode. returning null will result by child property values being put in a HashMap

Specified by:
getDynamicHeaderColumnName in class AbstractCompoundTypeNode

writeToColumnFamilyRowImpl

protected void writeToColumnFamilyRowImpl(Object value,
                                          ColumnFamilyRow row,
                                          TypeNodeContext context)
Specified by:
writeToColumnFamilyRowImpl in class AbstractCompoundTypeNode

readFromColumnFamilyRow

public SpaceDocument readFromColumnFamilyRow(ColumnFamilyRow row,
                                             TypeNodeContext context)
Description copied from interface: TypeNode
Recursively read the value matching this type node property from the ColumnFamilyRow.

Parameters:
row - The row to read from.
context - The current TypeNodeContext.
Returns:
The value read from the ColumnFamilyRow.

GigaSpaces XAP 9.5 API

Copyright © GigaSpaces.