GigaSpaces XAP 10.0.1 API

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

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

public class PojoTypeNode
extends AbstractCompoundTypeNode
implements ExternalizableTypeNode

POJO based CompoundTypeNode.

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

Field Summary
static byte SERIAL_VER
           
 
Constructor Summary
PojoTypeNode()
           
PojoTypeNode(String parentFullName, String name, Class<?> type, TypeNodeContext context)
           
 
Method Summary
protected  String getDynamicHeaderColumnName()
          controls how this type will be read from cassandra, see implementations and SpaceDocumentTopLevelTypeNode.
 String getFullName()
           
 String getName()
           
 Class<?> getType()
           
 void readExternal(ObjectInput in)
           
 Object readFromColumnFamilyRow(ColumnFamilyRow row, TypeNodeContext context)
          Recursively read the value matching this type node property from the ColumnFamilyRow.
 void writeExternal(ObjectOutput out)
           
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
 
Methods inherited from interface org.openspaces.persistency.cassandra.meta.mapping.node.TypeNode
writeToColumnFamilyRow
 

Field Detail

SERIAL_VER

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

PojoTypeNode

public PojoTypeNode()

PojoTypeNode

public PojoTypeNode(String parentFullName,
                    String name,
                    Class<?> type,
                    TypeNodeContext context)
Method Detail

getName

public String getName()
Specified by:
getName in interface TypeNode
Returns:
The type node simple property name (without the path).

getType

public Class<?> getType()
Specified by:
getType in interface TypeNode
Returns:
The type of this type nodes matching property.

getFullName

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

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 Object 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
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 10.0.1 API

Copyright © GigaSpaces.