Class MockDSExportSettings

All Implemented Interfaces:
HasHandlers

public class MockDSExportSettings extends DataClass
Settings used to control the export or serialization of a DataSource by Reify.getMockDS().
  • Constructor Details

    • MockDSExportSettings

      public MockDSExportSettings()
    • MockDSExportSettings

      public MockDSExportSettings(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static MockDSExportSettings getOrCreateRef(JavaScriptObject jsObj)
    • setCriteria

      public MockDSExportSettings setCriteria(Criteria criteria)
      The criteria used to fetch the records returned as part of the export or serialization.
      Parameters:
      criteria - New criteria value. Default value is null
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getCriteria

      public Criteria getCriteria()
      The criteria used to fetch the records returned as part of the export or serialization.
      Returns:
      Current criteria value. Default value is null
    • setFormat

      public MockDSExportSettings setFormat(MockDSExportFormat format)
      Determines the format emitted by Reify.getMockDS().
      Parameters:
      format - New format value. Default value is "xmlMockDS"
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getFormat

      public MockDSExportFormat getFormat()
      Determines the format emitted by Reify.getMockDS().
      Returns:
      Current format value. Default value is "xmlMockDS"
    • setIncludeCustomSimpleTypes

      public MockDSExportSettings setIncludeCustomSimpleTypes(boolean includeCustomSimpleTypes)
      Whether to include custom-defined SimpleTypes.
      Parameters:
      includeCustomSimpleTypes - New includeCustomSimpleTypes value. Default value is false
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getIncludeCustomSimpleTypes

      public boolean getIncludeCustomSimpleTypes()
      Whether to include custom-defined SimpleTypes.
      Returns:
      Current includeCustomSimpleTypes value. Default value is false
    • setIncludeFKs

      public MockDSExportSettings setIncludeFKs(boolean includeFKs)
      Should foreign key relationships be included in the export or serialization of the DataSource?
      Parameters:
      includeFKs - New includeFKs value. Default value is true
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getIncludeFKs

      public boolean getIncludeFKs()
      Should foreign key relationships be included in the export or serialization of the DataSource?
      Returns:
      Current includeFKs value. Default value is true
    • setIncludeImageFields

      public MockDSExportSettings setIncludeImageFields(boolean includeImageFields)
      Should image fields be included in the export or serialization of the DataSource? They are excluded by default since the stored paths are unlikely to be correct when placed in any other environment, such as Reify.
      Parameters:
      includeImageFields - New includeImageFields value. Default value is false
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getIncludeImageFields

      public boolean getIncludeImageFields()
      Should image fields be included in the export or serialization of the DataSource? They are excluded by default since the stored paths are unlikely to be correct when placed in any other environment, such as Reify.
      Returns:
      Current includeImageFields value. Default value is false
    • setNumLevels

      public MockDSExportSettings setNumLevels(int numLevels)
      The number of levels of nodes to include, for DataSources that define a tree relationship between fields by declaring a foreignKey on one field that refers to another from that same DataSource.
      Parameters:
      numLevels - New numLevels value. Default value is 3
      Returns:
      MockDSExportSettings instance, for chaining setter calls
      See Also:
    • getNumLevels

      public int getNumLevels()
      The number of levels of nodes to include, for DataSources that define a tree relationship between fields by declaring a foreignKey on one field that refers to another from that same DataSource.
      Returns:
      Current numLevels value. Default value is 3
      See Also:
    • setNumRows

      public MockDSExportSettings setNumRows(int numRows)
      The number of rows of data to include, if more meet the criteria.
      Parameters:
      numRows - New numRows value. Default value is 20
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getNumRows

      public int getNumRows()
      The number of rows of data to include, if more meet the criteria.
      Returns:
      Current numRows value. Default value is 20
    • setOmitRelations

      public MockDSExportSettings setOmitRelations(String... omitRelations)
      If including foreign key relationships, those relationships to skip. This can be used to avoid dangling references to DataSources that are not being exported or serialized.
      Parameters:
      omitRelations - New omitRelations value. Default value is null
      Returns:
      MockDSExportSettings instance, for chaining setter calls
      See Also:
    • getOmitRelations

      public String[] getOmitRelations()
      If including foreign key relationships, those relationships to skip. This can be used to avoid dangling references to DataSources that are not being exported or serialized.
      Returns:
      Current omitRelations value. Default value is null
      See Also:
    • setRequestProperties

      public MockDSExportSettings setRequestProperties(DSRequest... requestProperties)
      The properties that will be specified on the DSRequest when fetching records. You can pass an array of different request properties matching the length of the dsNames param of Reify.getMockDS() or Reify.showMockDS() if you want the fetch for each DataSource made with different properties.
      Parameters:
      requestProperties - New requestProperties value. Default value is null
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getRequestProperties

      public DSRequest[] getRequestProperties()
      The properties that will be specified on the DSRequest when fetching records. You can pass an array of different request properties matching the length of the dsNames param of Reify.getMockDS() or Reify.showMockDS() if you want the fetch for each DataSource made with different properties.
      Returns:
      Current requestProperties value. Default value is null
    • setRequestProperties

      public MockDSExportSettings setRequestProperties(DSRequest requestProperties)
      The properties that will be specified on the DSRequest when fetching records. You can pass an array of different request properties matching the length of the dsNames param of Reify.getMockDS() or Reify.showMockDS() if you want the fetch for each DataSource made with different properties.
      Parameters:
      requestProperties - New requestProperties value. Default value is null
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getRequestPropertiesAsDSRequest

      public DSRequest getRequestPropertiesAsDSRequest()
      The properties that will be specified on the DSRequest when fetching records. You can pass an array of different request properties matching the length of the dsNames param of Reify.getMockDS() or Reify.showMockDS() if you want the fetch for each DataSource made with different properties.
      Returns:
      Current requestProperties value. Default value is null
    • setRootCriteriaOnly

      public MockDSExportSettings setRootCriteriaOnly(boolean rootCriteriaOnly)
      For DataSources that define a tree relationship between fields by declaring a foreignKey on one field that refers to another from that same DataSource, should criteria be applied only to the root node? If false, the criteria will be applied to all nodes.
      Parameters:
      rootCriteriaOnly - New rootCriteriaOnly value. Default value is false
      Returns:
      MockDSExportSettings instance, for chaining setter calls
      See Also:
    • getRootCriteriaOnly

      public boolean getRootCriteriaOnly()
      For DataSources that define a tree relationship between fields by declaring a foreignKey on one field that refers to another from that same DataSource, should criteria be applied only to the root node? If false, the criteria will be applied to all nodes.
      Returns:
      Current rootCriteriaOnly value. Default value is false
      See Also:
    • setValidatorMode

      public MockDSExportSettings setValidatorMode(MockDSExportValidatorMode validatorMode)
      Controls which validators, if any, to include in the fields of the exported MockDataSource. Since MockDataSources are client-only, server-only validators are not exported. Auto-generated validators are also not exported, since they will be recreated based on the type of the field during the import process.
      Parameters:
      validatorMode - New validatorMode value. Default value is "standard"
      Returns:
      MockDSExportSettings instance, for chaining setter calls
    • getValidatorMode

      public MockDSExportValidatorMode getValidatorMode()
      Controls which validators, if any, to include in the fields of the exported MockDataSource. Since MockDataSources are client-only, server-only validators are not exported. Auto-generated validators are also not exported, since they will be recreated based on the type of the field during the import process.
      Returns:
      Current validatorMode value. Default value is "standard"