public class SpaceTypeDescriptorBuilder extends Object
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
SpaceTypeDescriptorBuilder |
addCompoundIndex(String[] paths)
Adds an index of the specified type for the specified path.
|
SpaceTypeDescriptorBuilder |
addCompoundIndex(String[] paths,
boolean unique)
Adds an index of the specified type for the specified path.
|
SpaceTypeDescriptorBuilder |
addCompoundIndex(String[] paths,
SpaceIndexType indexType)
Deprecated.
|
SpaceTypeDescriptorBuilder |
addCompoundIndex(String[] paths,
SpaceIndexType indexType,
boolean unique)
Deprecated.
|
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,
SpaceDocumentSupport documentSupport)
Adds a property to the fixed properties set.
|
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
Class<?> propertyType,
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,
SpaceDocumentSupport documentSupport) |
SpaceTypeDescriptorBuilder |
addFixedProperty(String propertyName,
String propertyTypeName,
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 |
addPathIndex(String path,
SpaceIndexType indexType,
boolean unique)
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.
|
SpaceTypeDescriptorBuilder |
addPropertyIndex(String propertyName,
SpaceIndexType indexType,
boolean unique)
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 |
sequenceNumberProperty(String sequenceNumberPropertyName,
boolean sequenceNumberFromDocumentBuilder) |
SpaceTypeDescriptorBuilder |
setBlobstoreEnabled(boolean blobstoreEnabled)
Sets whether for this type blobstore data is enabled when cache policy is set for blobstore.
|
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.
|
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)
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 setBlobstoreEnabled(boolean blobstoreEnabled)
true
- if this type blobstore data is enabled, 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, 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 propertypublic SpaceTypeDescriptorBuilder addFixedProperty(String propertyName, Class<?> propertyType, SpaceDocumentSupport documentSupport, StorageType storageType)
propertyName
- Name of property.propertyType
- Type of property.documentSupport
- Document support of property.storageType
- StorageType of propertypublic SpaceTypeDescriptorBuilder addFixedProperty(String propertyName, String propertyTypeName)
propertyName
- Name of property.propertyTypeName
- Name of type of property.public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName, String propertyTypeName, SpaceDocumentSupport documentSupport)
public SpaceTypeDescriptorBuilder addFixedProperty(String propertyName, String propertyTypeName, 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 sequenceNumberProperty(String sequenceNumberPropertyName, boolean sequenceNumberFromDocumentBuilder)
public SpaceTypeDescriptorBuilder addFifoGroupingIndex(String fifoGroupingIndexPath)
fifoGroupingIndexPath
- Path of fifo groupingpublic SpaceTypeDescriptorBuilder addPropertyIndex(String propertyName, SpaceIndexType indexType)
propertyName
- Name of property to index.indexType
- Type of index.public SpaceTypeDescriptorBuilder addPropertyIndex(String propertyName, SpaceIndexType indexType, boolean unique)
propertyName
- Name of property to index.indexType
- Type of index.unique
- is it a unique indexpublic SpaceTypeDescriptorBuilder addPathIndex(String path, SpaceIndexType indexType)
path
- Path to indexindexType
- Type of index.public SpaceTypeDescriptorBuilder addPathIndex(String path, SpaceIndexType indexType, boolean unique)
path
- Path to indexindexType
- Type of index.unique
- is it a unique index@Deprecated public SpaceTypeDescriptorBuilder addCompoundIndex(String[] paths, SpaceIndexType indexType)
path
- Path to indexindexType
- Type of index.public SpaceTypeDescriptorBuilder addCompoundIndex(String[] paths)
path
- Path to indexindexType
- Type of index.@Deprecated public SpaceTypeDescriptorBuilder addCompoundIndex(String[] paths, SpaceIndexType indexType, boolean unique)
path
- Path to indexindexType
- Type of index.unique
- is it a unique indexpublic SpaceTypeDescriptorBuilder addCompoundIndex(String[] paths, boolean unique)
path
- Path to indexindexType
- Type of index.unique
- is it a unique indexpublic SpaceTypeDescriptorBuilder addIndex(SpaceIndex index)
index
- Index to add.public SpaceTypeDescriptor create()
Copyright © GigaSpaces.