public class NodeSchemaService extends SingletonSerializeAsToken implements SchemaService
Most basic implementation of interface SchemaService.
TODO: support loading schema options from node configuration.
TODO: support configuring what schemas are to be selected for persistence.
TODO: support plugins for schema version upgrading or custom mapping not supported by original interface QueryableState.
interface SchemaService,
interface QueryableStateSchemaService.SchemaOptions| Constructor and Description |
|---|
NodeSchemaService()
Most basic implementation of
interface SchemaService. |
| Modifier and Type | Method and Description |
|---|---|
PersistentState |
generateMappedObject(QueryableState state,
MappedSchema schema)
Map a state to a
class PersistentState for the given schema, either via direct support from the state
or via custom logic in this service. |
java.util.Map<net.corda.core.schemas.MappedSchema,net.corda.node.services.api.SchemaService.SchemaOptions> |
getSchemaOptions()
Options configured for this node's schemas. A missing entry for a schema implies all properties are null.
|
java.lang.Iterable<net.corda.core.schemas.MappedSchema> |
selectSchemas(QueryableState state)
Given a state, select schemas to map it to that are supported by generateMappedObject and that are configured
for this node.
|
toTokengenerateMappedObject, getSchemaOptions, selectSchemastoTokenpublic NodeSchemaService()
Most basic implementation of interface SchemaService.
TODO: support loading schema options from node configuration.
TODO: support configuring what schemas are to be selected for persistence.
TODO: support plugins for schema version upgrading or custom mapping not supported by original interface QueryableState.
interface SchemaService,
interface QueryableStatepublic java.util.Map<net.corda.core.schemas.MappedSchema,net.corda.node.services.api.SchemaService.SchemaOptions> getSchemaOptions()
Options configured for this node's schemas. A missing entry for a schema implies all properties are null.
public java.lang.Iterable<net.corda.core.schemas.MappedSchema> selectSchemas(QueryableState state)
Given a state, select schemas to map it to that are supported by generateMappedObject and that are configured for this node.
public PersistentState generateMappedObject(QueryableState state, MappedSchema schema)
Map a state to a class PersistentState for the given schema, either via direct support from the state
or via custom logic in this service.
class PersistentState