Interface SchemaDefinition<T>


@Public @Stable public interface SchemaDefinition<T>
Interface for schema definition.
  • Method Details

    • builder

      static <T> SchemaDefinitionBuilder<T> builder()
      Get a new builder instance that can used to configure and build a SchemaDefinition instance.
      Returns:
      the SchemaDefinition
    • getAlwaysAllowNull

      boolean getAlwaysAllowNull()
      Get schema whether always allow null or not.
      Returns:
      schema always null or not
    • isJsr310ConversionEnabled

      boolean isJsr310ConversionEnabled()
      Get JSR310 conversion enabled.
      Returns:
      return true if enable JSR310 conversion. false means use Joda time conversion.
    • getProperties

      Map<String,String> getProperties()
      Get schema class.
      Returns:
      schema class
    • getJsonDef

      String getJsonDef()
      Get json schema definition.
      Returns:
      schema class
    • getPojo

      Class<T> getPojo()
      Get pojo schema definition.
      Returns:
      pojo schema
    • getClassLoader

      ClassLoader getClassLoader()
      Get pojo classLoader.
      Returns:
      pojo schema
    • getSupportSchemaVersioning

      boolean getSupportSchemaVersioning()
      Get supportSchemaVersioning schema definition.
      Returns:
      the flag of supportSchemaVersioning
    • getSchemaReaderOpt

      Optional<SchemaReader<T>> getSchemaReaderOpt()
      Get a configured schema reader.
      Returns:
      optional containing configured schema reader or empty optional if none is configure
    • getSchemaWriterOpt

      Optional<SchemaWriter<T>> getSchemaWriterOpt()
      Get a configured schema writer.
      Returns:
      optional containing configured schema writer or empty optional if none is configure