|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gigaspaces.metadata.SpaceTypeDescriptorBuilder
public class SpaceTypeDescriptorBuilder
A builder class for creating SpaceTypeDescriptor instances.
For example, to create a type descriptor with type name 'foo' and id property 'bar' use the following code:
new SpaceTypeDescriptorBuilder("foo").setIdProperty("bar").create()
SpaceTypeDescriptor| Constructor Summary | |
|---|---|
SpaceTypeDescriptorBuilder(Class<?> type,
SpaceTypeDescriptor superTypeDescriptor)
|
|
SpaceTypeDescriptorBuilder(String typeName)
Initialize a type descriptor builder using the specified type name. |
|
SpaceTypeDescriptorBuilder(String typeName,
SpaceTypeDescriptor superTypeDescriptor)
Initialize a type descriptor builder using the specified type name and super type descriptor. |
|
| Method Summary | |
|---|---|
SpaceTypeDescriptorBuilder |
addCompoundIndex(String[] paths,
SpaceIndexType indexType)
Adds an index of the specified type for the specified path. |
SpaceTypeDescriptorBuilder |
addFifoGroupingIndex(String fifoGroupingIndexPath)
Sets a fifo grouping index |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
Class<?> propertyType)
Adds a property to the fixed properties set. |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
Class<?> propertyType,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport)
Adds a property to the fixed properties set. |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
Class<?> propertyType,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport,
StorageType storageType)
Adds a property to the fixed properties set. |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
Class<?> propertyType,
StorageType storageType)
Adds a property to the fixed properties set. |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
String propertyTypeName)
Adds a property to the fixed properties set. |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
String propertyTypeName,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport)
|
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
String propertyTypeName,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport,
StorageType storageType)
|
SpaceTypeDescriptorBuilder |
addIndex(SpaceIndex index)
Adds the specified index to the type's index set. |
SpaceTypeDescriptorBuilder |
addPathIndex(String path,
SpaceIndexType indexType)
Adds an index of the specified type for the specified path. |
SpaceTypeDescriptorBuilder |
addPropertyIndex(String propertyName,
SpaceIndexType indexType)
Adds an index of the specified type for the specified property. |
SpaceTypeDescriptor |
create()
Create the space type descriptor using the gathered information. |
SpaceTypeDescriptorBuilder |
documentWrapperClass(Class<? extends SpaceDocument> documentWrapperClass)
Sets the document wrapper class for this type. |
SpaceTypeDescriptorBuilder |
fifoGroupingProperty(String fifoGroupingPropertyPath)
Sets the fifo grouping property |
SpaceTypeDescriptorBuilder |
fifoSupport(FifoSupport fifoSupport)
Sets this type FIFO support. |
SpaceTypeDescriptorBuilder |
idProperty(String idPropertyName)
Sets the ID property. |
SpaceTypeDescriptorBuilder |
idProperty(String idPropertyName,
boolean autoGenerateId)
Sets the ID property. |
SpaceTypeDescriptorBuilder |
idProperty(String idPropertyName,
boolean autoGenerateId,
SpaceIndexType indexType)
Sets the ID property. |
SpaceTypeDescriptorBuilder |
replicable(boolean replicable)
Sets whether this type is replicable or not. |
SpaceTypeDescriptorBuilder |
routingProperty(String routingPropertyName)
Sets the routing property. |
SpaceTypeDescriptorBuilder |
routingProperty(String routingPropertyName,
SpaceIndexType indexType)
Sets the routing property. |
SpaceTypeDescriptorBuilder |
storageType(StorageType storageType)
Sets type's storage type |
SpaceTypeDescriptorBuilder |
supportsDynamicProperties(boolean supportsDynamicProperties)
Sets whether or not this type supports dynamic properties. |
SpaceTypeDescriptorBuilder |
supportsOptimisticLocking(boolean supportsOptimisticLocking)
Sets whether or not this type supports optimistic locking. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpaceTypeDescriptorBuilder(String typeName)
typeName - Name of type.
public SpaceTypeDescriptorBuilder(String typeName,
SpaceTypeDescriptor superTypeDescriptor)
typeName - Name of type.superTypeDescriptor - Type descriptor of super type.
public SpaceTypeDescriptorBuilder(Class<?> type,
SpaceTypeDescriptor superTypeDescriptor)
| Method Detail |
|---|
public SpaceTypeDescriptorBuilder documentWrapperClass(Class<? extends SpaceDocument> documentWrapperClass)
SpaceDocument
and can be used as a surrogate for a specific type.
documentWrapperClass - The document wrapper class for this type.public SpaceTypeDescriptorBuilder fifoSupport(FifoSupport fifoSupport)
fifoSupport - Desired FIFO support.public SpaceTypeDescriptorBuilder replicable(boolean replicable)
replicable - true if this type is replicable, false otherwise.public SpaceTypeDescriptorBuilder supportsDynamicProperties(boolean supportsDynamicProperties)
supportsDynamicProperties - true if this type supports dynamic properties, false otherwise.public SpaceTypeDescriptorBuilder supportsOptimisticLocking(boolean supportsOptimisticLocking)
supportsOptimisticLocking - true if this type supports optimistic locking, false otherwise.public SpaceTypeDescriptorBuilder storageType(StorageType storageType)
storageType -
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
Class<?> propertyType)
propertyName - Name of property.propertyType - Type of property.
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
Class<?> propertyType,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport)
propertyName - Name of property.propertyType - Type of property.documentSupport - Document support of property.
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
Class<?> propertyType,
StorageType storageType)
propertyName - Name of property.propertyType - Type of property.storageType - StorageType of property
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
Class<?> propertyType,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport,
StorageType storageType)
propertyName - Name of property.propertyType - Type of property.documentSupport - Document support of property.storageType - StorageType of property
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
String propertyTypeName)
propertyName - Name of property.propertyTypeName - Name of type of property.
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
String propertyTypeName,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport)
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName,
String propertyTypeName,
com.gigaspaces.metadata.SpaceDocumentSupport documentSupport,
StorageType storageType)
public SpaceTypeDescriptorBuilder idProperty(String idPropertyName)
idPropertyName - Name of ID property.
public SpaceTypeDescriptorBuilder idProperty(String idPropertyName,
boolean autoGenerateId)
idPropertyName - Name of ID property.autoGenerateId - false if the uid is generated using the id value, true if the uid is automatically generated.
public SpaceTypeDescriptorBuilder idProperty(String idPropertyName,
boolean autoGenerateId,
SpaceIndexType indexType)
idPropertyName - Name of ID property.autoGenerateId - false if the uid is generated using the id value, true if the uid is automatically generated.indexType - Type of index.public SpaceTypeDescriptorBuilder routingProperty(String routingPropertyName)
routingPropertyName - Name of routing property.
public SpaceTypeDescriptorBuilder routingProperty(String routingPropertyName,
SpaceIndexType indexType)
routingPropertyName - Name of routing property.indexType - Routing property index type.public SpaceTypeDescriptorBuilder fifoGroupingProperty(String fifoGroupingPropertyPath)
fifoGroupingPropertyPath - Path of fifo grouping propertypublic SpaceTypeDescriptorBuilder addFifoGroupingIndex(String fifoGroupingIndexPath)
fifoGroupingIndexPath - Path of fifo grouping
public SpaceTypeDescriptorBuilder addPropertyIndex(String propertyName,
SpaceIndexType indexType)
propertyName - Name of property to index.indexType - Type of index.
public SpaceTypeDescriptorBuilder addPathIndex(String path,
SpaceIndexType indexType)
path - Path to indexindexType - Type of index.
public SpaceTypeDescriptorBuilder addCompoundIndex(String[] paths,
SpaceIndexType indexType)
path - Path to indexindexType - Type of index.public SpaceTypeDescriptorBuilder addIndex(SpaceIndex index)
index - Index to add.public SpaceTypeDescriptor create()
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||