GigaSpaces XAP 9.5 API

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

java.lang.Object
  extended by org.openspaces.persistency.cassandra.meta.mapping.node.AbstractCompoundTypeNode
      extended by org.openspaces.persistency.cassandra.meta.mapping.node.SpaceDocumentTypeNode
          extended by org.openspaces.persistency.cassandra.meta.mapping.node.SpaceDocumentTopLevelTypeNode
All Implemented Interfaces:
Externalizable, Serializable, CompoundTypeNode, ExternalizableTypeNode, TopLevelTypeNode, TypeNode

public class SpaceDocumentTopLevelTypeNode
extends SpaceDocumentTypeNode
implements TopLevelTypeNode

A SpaceDocument based implementation of TopLevelTypeNode.

Since:
9.1.1
Author:
Dan Kilman
See Also:
Serialized Form

Field Summary
static byte SERIAL_VER
           
 
Fields inherited from class org.openspaces.persistency.cassandra.meta.mapping.node.SpaceDocumentTypeNode
fullName, name, typeName
 
Constructor Summary
SpaceDocumentTopLevelTypeNode()
           
SpaceDocumentTopLevelTypeNode(String typeName, String keyName, Class<?> keyType, Map<String,TypeNode> initialChildren, TypeNodeContext context)
           
 
Method Summary
protected  String generateFullName(String parentFullName, String name)
           
 String getKeyName()
           
 Class<?> getKeyType()
           
 void readExternal(ObjectInput in)
           
 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)
           
 void writeExternal(ObjectOutput out)
           
protected  void writePropertyToColumnFamilyRow(ColumnFamilyRow row, String propertyName, Object propertyValue, TypeNodeContext context)
           
 
Methods inherited from class org.openspaces.persistency.cassandra.meta.mapping.node.SpaceDocumentTypeNode
getDynamicHeaderColumnName, getFullName, getName, getType, getTypeName, writeToColumnFamilyRowImpl
 
Methods inherited from class org.openspaces.persistency.cassandra.meta.mapping.node.AbstractCompoundTypeNode
getAllTypedColumnMetadataChildren, getChildren, writeToColumnFamilyRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openspaces.persistency.cassandra.meta.mapping.node.TopLevelTypeNode
getTypeName
 
Methods inherited from interface org.openspaces.persistency.cassandra.meta.mapping.node.CompoundTypeNode
getAllTypedColumnMetadataChildren
 
Methods inherited from interface org.openspaces.persistency.cassandra.meta.mapping.node.TypeNode
getFullName, getName, getType, writeToColumnFamilyRow
 

Field Detail

SERIAL_VER

public static final byte SERIAL_VER
See Also:
Constant Field Values
Constructor Detail

SpaceDocumentTopLevelTypeNode

public SpaceDocumentTopLevelTypeNode()

SpaceDocumentTopLevelTypeNode

public SpaceDocumentTopLevelTypeNode(String typeName,
                                     String keyName,
                                     Class<?> keyType,
                                     Map<String,TypeNode> initialChildren,
                                     TypeNodeContext context)
Method Detail

getKeyName

public String getKeyName()
Specified by:
getKeyName in interface TopLevelTypeNode
Returns:
The key name to be used in Cassandra for this type (in space terminology: the type id property name).

getKeyType

public Class<?> getKeyType()
Specified by:
getKeyType in interface TopLevelTypeNode
Returns:
The key type.

generateFullName

protected String generateFullName(String parentFullName,
                                  String name)
Overrides:
generateFullName in class SpaceDocumentTypeNode

shouldSkipEntryWrite

protected boolean shouldSkipEntryWrite(String key,
                                       Object value)
Overrides:
shouldSkipEntryWrite in class SpaceDocumentTypeNode

writePropertyToColumnFamilyRow

protected void writePropertyToColumnFamilyRow(ColumnFamilyRow row,
                                              String propertyName,
                                              Object propertyValue,
                                              TypeNodeContext context)
Overrides:
writePropertyToColumnFamilyRow 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.

Specified by:
readFromColumnFamilyRow in interface TypeNode
Overrides:
readFromColumnFamilyRow in class SpaceDocumentTypeNode
Parameters:
row - The row to read from.
context - The current TypeNodeContext.
Returns:
The value read from the ColumnFamilyRow.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

GigaSpaces XAP 9.5 API

Copyright © GigaSpaces.