IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.plugins.io.datadescriptor
Class DataDescriptorFactory

java.lang.Object
  extended by com.ibm.websphere.objectgrid.plugins.io.datadescriptor.DataDescriptorFactory

public final class DataDescriptorFactory
extends Object

A factory for creating DataDescriptor instances when using custom DataSerializers. Each descriptor object includes factory methods for a mutable version that can be altered until it is initialized, and an immutable version which cannot be altered.

Since:
7.1.1

Constructor Summary
DataDescriptorFactory()
           
 
Method Summary
 Association createAssociation()
          Create a mutable new Association instance.
 Association createAssociation(String attributeName, String targetMap)
          Create an immutable Association instance with the minimum required values set.
 Attribute createAttribute()
          Create a mutable Attribute instance.
 Attribute createAttribute(String attributeName, AttributeType attributeType, EmbeddedType embeddedType, boolean isCollection)
          Create an immutable Attribute instance.
 EmbeddedType createEmbeddedType()
          Create a mutable EmbeddedType instance.
 EmbeddedType createEmbeddedType(Map<String,Attribute> attributes)
          Create an immutable EmbeddedType instance.
 KeyDataDescriptor createKeyDataDescriptor()
          Create a mutable KeyDataDescriptor instance.
 KeyDataDescriptor createKeyDataDescriptor(Map<String,Attribute> attributes, String pathSeparator)
          Create an immutable KeyDataDescriptor instance.
 MapDataDescriptor createMapDataDescriptor()
          Create a mutable MapDataDescriptor instance.
 MapDataDescriptor createMapDataDescriptor(Map<String,Association> associations, String addressableKeyName)
          Create an immutable MapDataDescriptor instance.
 ValueDataDescriptor createValueDataDescriptor()
          Create a mutable ValueDataDescriptor instance.
 ValueDataDescriptor createValueDataDescriptor(Map<String,Attribute> attributes, String pathSeparator)
          Create an immutable ValueDataDescriptor instance.
static DataDescriptorFactory instance()
          Retrieve an instance of the DataDescriptorFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDescriptorFactory

public DataDescriptorFactory()
Method Detail

instance

public static DataDescriptorFactory instance()
Retrieve an instance of the DataDescriptorFactory

Returns:
a DataDescriptorFactory instance

createMapDataDescriptor

public MapDataDescriptor createMapDataDescriptor()
Create a mutable MapDataDescriptor instance.

Returns:
a mutable MapDataDescriptor instance

createMapDataDescriptor

public MapDataDescriptor createMapDataDescriptor(Map<String,Association> associations,
                                                 String addressableKeyName)
Create an immutable MapDataDescriptor instance.

Parameters:
associations - the associations between this map and another map. Each association identifies a relationship between two maps using a foreign key. If null, there are no associations.
addressableKeyName - the addressable attribute name to use for accessing KeyDataSerializer data when using partial key lookups such as a query. If null, the value: MapDataDescriptor.DEFAULT_ADDRESSABLEKEYNAME is used.
Returns:
an immutable MapDataDescriptor instance

createKeyDataDescriptor

public KeyDataDescriptor createKeyDataDescriptor()
Create a mutable KeyDataDescriptor instance.

Returns:
a mutable KeyDataDescriptor instance

createKeyDataDescriptor

public KeyDataDescriptor createKeyDataDescriptor(Map<String,Attribute> attributes,
                                                 String pathSeparator)
Create an immutable KeyDataDescriptor instance.

Parameters:
attributes - the attributes that define the attributes exposed by the KeyDataDescriptor.
pathSeparator - the string to use to use for attribute navigation for embedded attributes. The string must not include a valid attribute name that the DataDescriptor exposes, nor the underscore "_" character. If null, the default DataDescriptor.DEFAULT_PATHSEPARATOR is used.
Returns:
an immutable KeyDataDescriptor instance

createValueDataDescriptor

public ValueDataDescriptor createValueDataDescriptor()
Create a mutable ValueDataDescriptor instance.

Returns:
a mutable ValueDataDescriptor instance

createValueDataDescriptor

public ValueDataDescriptor createValueDataDescriptor(Map<String,Attribute> attributes,
                                                     String pathSeparator)
Create an immutable ValueDataDescriptor instance.

Parameters:
attributes - the attributes that define the attributes exposed by the ValueDataDescriptor.
pathSeparator - the string to use to use for attribute navigation for embedded attributes. The string must not include a valid attribute name that the DataDescriptor exposes, nor the underscore "_" character. If null, the default DataDescriptor.DEFAULT_PATHSEPARATOR is used.
Returns:
an immutable ValueDataDescriptor instance

createAttribute

public Attribute createAttribute()
Create a mutable Attribute instance.

Returns:
a mutable Attribute instance.

createAttribute

public Attribute createAttribute(String attributeName,
                                 AttributeType attributeType,
                                 EmbeddedType embeddedType,
                                 boolean isCollection)
Create an immutable Attribute instance.

Parameters:
attributeName - the name of the attribute. This value is required and must not be null.
attributeType - the type of the attribute. This value is required and must not be null.
embeddedType - the embedded type of the attribute, or null if the type is not AttributeType.EMBEDDED.
isCollection - true, if the attribute has more than one element.
Returns:
an immutable Attribute instance.

createAssociation

public Association createAssociation()
Create a mutable new Association instance.

Returns:
a mutable Association instance.

createAssociation

public Association createAssociation(String attributeName,
                                     String targetMap)
Create an immutable Association instance with the minimum required values set.

Parameters:
attributeName - the name of the attribute that holds the association key. This value is required and must not be null.
targetMap - the name of the map that the association references. This value is required and must not be null.
Returns:
an immutable Association instance.

createEmbeddedType

public EmbeddedType createEmbeddedType()
Create a mutable EmbeddedType instance.

Returns:
a mutable EmbeddedType instance instance.

createEmbeddedType

public EmbeddedType createEmbeddedType(Map<String,Attribute> attributes)
Create an immutable EmbeddedType instance.

Parameters:
attributes - a map of attribute definitions, where the key is the attribute name.
Returns:
an immutable EmbeddedType instance instance.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.