Interface FieldService

All Superinterfaces:
Service

public interface FieldService
extends Service
Service for instantiating Field and FieldId instances.

Fields are used for specifying input to APIs such as SqlService.executeReport(com.onenetwork.platform.data.sql.ReportRequest, com.onenetwork.platform.common.usercontext.PlatformUserContext), and also appear as output in Table metadata.

  • Method Summary

    Modifier and Type Method Description
    Field newField​(FieldId fieldId, FieldType fieldType)
    Creates a new ad-hoc Field, with a user-supplied FieldType
    Field newField​(java.lang.Class<? extends Model> modelLevel, java.lang.String name)
    Creates a new Field by looking up the field from the model definition.
    Field newField​(java.lang.String level, java.lang.String name, FieldType fieldType)
    Creates a new ad-hoc Field, with a user-supplied FieldType.
    FieldId newFieldId​(java.lang.Class<? extends Model> modelLevel, java.lang.String name)
    Creates a new FieldId, using the given Model class as the "level"
    FieldId newFieldId​(java.lang.String level, java.lang.String name)
    Creates a new ad-hoc FieldId.
  • Method Details

    • newField

      Field newField​(java.lang.String level, java.lang.String name, FieldType fieldType)
      Creates a new ad-hoc Field, with a user-supplied FieldType.
      Parameters:
      level - level (can be a model level, or any arbitrary string for ad-hoc fields)
      name - field name (can be a model field, or any arbitrary string for ad-hoc fields)
      fieldType - type of the field
      Returns:
      new Field
    • newField

      Field newField​(FieldId fieldId, FieldType fieldType)
      Creates a new ad-hoc Field, with a user-supplied FieldType
      Parameters:
      fieldId - Field Identifier
      fieldType - field type
      Returns:
      new Field
    • newField

      Field newField​(java.lang.Class<? extends Model> modelLevel, java.lang.String name)
      Creates a new Field by looking up the field from the model definition.
      Parameters:
      level - model level class
      name - name of the field from a model definition
      Returns:
      new FieldId
    • newFieldId

      FieldId newFieldId​(java.lang.String level, java.lang.String name)
      Creates a new ad-hoc FieldId.
      Parameters:
      name - name of the field (ie "column")
      level - level of the field (ie "table")
      Returns:
      new FieldId
    • newFieldId

      FieldId newFieldId​(java.lang.Class<? extends Model> modelLevel, java.lang.String name)
      Creates a new FieldId, using the given Model class as the "level"
      Parameters:
      level - model level class
      name - name of the field from a model definition
      Returns:
      new FieldId