MappedSchema
Keywords: net.corda.core.schemas.MappedSchema class
Date: 2023-09-18

net.corda.core.schemas

## Class MappedSchema

- net.corda.core.schemas.MappedSchema

- Direct Known Subclasses:
    CashSchemaV1, CommercialPaperSchemaV1, CommonSchemaV1, SampleCashSchemaV1, SampleCashSchemaV2, SampleCashSchemaV3

      public class MappedSchema

  A database schema that might be configured for this node. As well as a name and version for identifying the schema, also list the classes that may be used in the generated object graph in order to configure the ORM tool.

- - ### Constructor Detail

    - #### MappedSchema

          public MappedSchema(@NotNull
                              java.lang.Class<?> schemaFamily,
                              int version,
                              @NotNull
                              java.lang.Iterable<? extends java.lang.Class<?>> mappedTypes)

      A database schema that might be configured for this node. As well as a name and version for identifying the schema, also list the classes that may be used in the generated object graph in order to configure the ORM tool.

      Parameters:
        `schemaFamily` - A class to fully qualify the name of a schema family (i.e. excludes version)
        `version` - The version number of this instance within the family.
        `mappedTypes` - The JPA entity classes that the ORM layer needs to be configure with for this schema.

  - ### Method Detail

    - #### getName

          @NotNull
          public java.lang.String getName()

    - #### getMigrationResource

          @Nullable
          public java.lang.String getMigrationResource()

      Optional classpath resource containing the database changes for the mappedTypes

    - #### toString

          @NotNull
          public java.lang.String toString()

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object other)

    - #### hashCode

          public int hashCode()

    - #### getVersion

          public int getVersion()

      The version number of this instance within the family.

    - #### getMappedTypes

          @NotNull
          public java.lang.Iterable<java.lang.Class> getMappedTypes()

      The JPA entity classes that the ORM layer needs to be configure with for this schema.