Package com.smartgwt.client.util
Class MockDSExportSettings
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.util.MockDSExportSettings
- All Implemented Interfaces:
HasHandlers
Settings used to control the export or serialization of a
DataSource by Reify.getMockDS().-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThecriteriaused to fetch the records returned as part of the export or serialization.Determines the format emitted byReify.getMockDS().booleanWhether to include custom-definedSimpleTypes.booleanShouldforeign keyrelationships be included in the export or serialization of theDataSource?booleanShouldimage fieldsbe included in the export or serialization of theDataSource? They are excluded by default since the stored paths are unlikely to be correct when placed in any other environment, such as Reify.intThe number of levels of nodes to include, for DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource.intThe number of rows of data to include, if more meet thecriteria.String[]If includingforeign keyrelationships, those relationships to skip.static MockDSExportSettingsgetOrCreateRef(JavaScriptObject jsObj) The properties that will be specified on theDSRequestwhen fetching records.The properties that will be specified on theDSRequestwhen fetching records.booleanFor DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource, shouldcriteriabe applied only to the root node? If false, the criteria will be applied to all nodes.Controls whichvalidators, if any, to include in the fields of the exportedMockDataSource.setCriteria(Criteria criteria) Thecriteriaused to fetch the records returned as part of the export or serialization.setFormat(MockDSExportFormat format) Determines the format emitted byReify.getMockDS().setIncludeCustomSimpleTypes(boolean includeCustomSimpleTypes) Whether to include custom-definedSimpleTypes.setIncludeFKs(boolean includeFKs) Shouldforeign keyrelationships be included in the export or serialization of theDataSource?setIncludeImageFields(boolean includeImageFields) Shouldimage fieldsbe included in the export or serialization of theDataSource? They are excluded by default since the stored paths are unlikely to be correct when placed in any other environment, such as Reify.setNumLevels(int numLevels) The number of levels of nodes to include, for DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource.setNumRows(int numRows) The number of rows of data to include, if more meet thecriteria.setOmitRelations(String... omitRelations) If includingforeign keyrelationships, those relationships to skip.setRequestProperties(DSRequest requestProperties) The properties that will be specified on theDSRequestwhen fetching records.setRequestProperties(DSRequest... requestProperties) The properties that will be specified on theDSRequestwhen fetching records.setRootCriteriaOnly(boolean rootCriteriaOnly) For DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource, shouldcriteriabe applied only to the root node? If false, the criteria will be applied to all nodes.setValidatorMode(MockDSExportValidatorMode validatorMode) Controls whichvalidators, if any, to include in the fields of the exportedMockDataSource.Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
MockDSExportSettings
public MockDSExportSettings() -
MockDSExportSettings
-
-
Method Details
-
getOrCreateRef
-
setCriteria
Thecriteriaused to fetch the records returned as part of the export or serialization.- Parameters:
criteria- New criteria value. Default value is null- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getCriteria
Thecriteriaused to fetch the records returned as part of the export or serialization.- Returns:
- Current criteria value. Default value is null
-
setFormat
Determines the format emitted byReify.getMockDS().- Parameters:
format- New format value. Default value is "xmlMockDS"- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getFormat
Determines the format emitted byReify.getMockDS().- Returns:
- Current format value. Default value is "xmlMockDS"
-
setIncludeCustomSimpleTypes
Whether to include custom-definedSimpleTypes.- Parameters:
includeCustomSimpleTypes- New includeCustomSimpleTypes value. Default value is false- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getIncludeCustomSimpleTypes
public boolean getIncludeCustomSimpleTypes()Whether to include custom-definedSimpleTypes.- Returns:
- Current includeCustomSimpleTypes value. Default value is false
-
setIncludeFKs
Shouldforeign keyrelationships be included in the export or serialization of theDataSource?- Parameters:
includeFKs- New includeFKs value. Default value is true- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getIncludeFKs
public boolean getIncludeFKs()Shouldforeign keyrelationships be included in the export or serialization of theDataSource?- Returns:
- Current includeFKs value. Default value is true
-
setIncludeImageFields
Shouldimage fieldsbe included in the export or serialization of theDataSource? 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:
MockDSExportSettingsinstance, for chaining setter calls
-
getIncludeImageFields
public boolean getIncludeImageFields()Shouldimage fieldsbe included in the export or serialization of theDataSource? 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
The number of levels of nodes to include, for DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource.- Parameters:
numLevels- New numLevels value. Default value is 3- Returns:
MockDSExportSettingsinstance, for chaining setter calls- See Also:
-
getNumLevels
public int getNumLevels()The number of levels of nodes to include, for DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource.- Returns:
- Current numLevels value. Default value is 3
- See Also:
-
setNumRows
The number of rows of data to include, if more meet thecriteria.- Parameters:
numRows- New numRows value. Default value is 20- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getNumRows
public int getNumRows()The number of rows of data to include, if more meet thecriteria.- Returns:
- Current numRows value. Default value is 20
-
setOmitRelations
If includingforeign keyrelationships, those relationships to skip. This can be used to avoid dangling references toDataSourcesthat are not being exported or serialized.- Parameters:
omitRelations- New omitRelations value. Default value is null- Returns:
MockDSExportSettingsinstance, for chaining setter calls- See Also:
-
getOmitRelations
If includingforeign keyrelationships, those relationships to skip. This can be used to avoid dangling references toDataSourcesthat are not being exported or serialized.- Returns:
- Current omitRelations value. Default value is null
- See Also:
-
setRequestProperties
The properties that will be specified on theDSRequestwhen fetching records. You can pass an array of different request properties matching the length of thedsNamesparam ofReify.getMockDS()orReify.showMockDS()if you want the fetch for eachDataSourcemade with different properties.- Parameters:
requestProperties- New requestProperties value. Default value is null- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getRequestProperties
The properties that will be specified on theDSRequestwhen fetching records. You can pass an array of different request properties matching the length of thedsNamesparam ofReify.getMockDS()orReify.showMockDS()if you want the fetch for eachDataSourcemade with different properties.- Returns:
- Current requestProperties value. Default value is null
-
setRequestProperties
The properties that will be specified on theDSRequestwhen fetching records. You can pass an array of different request properties matching the length of thedsNamesparam ofReify.getMockDS()orReify.showMockDS()if you want the fetch for eachDataSourcemade with different properties.- Parameters:
requestProperties- New requestProperties value. Default value is null- Returns:
MockDSExportSettingsinstance, for chaining setter calls
-
getRequestPropertiesAsDSRequest
The properties that will be specified on theDSRequestwhen fetching records. You can pass an array of different request properties matching the length of thedsNamesparam ofReify.getMockDS()orReify.showMockDS()if you want the fetch for eachDataSourcemade with different properties.- Returns:
- Current requestProperties value. Default value is null
-
setRootCriteriaOnly
For DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource, shouldcriteriabe 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:
MockDSExportSettingsinstance, for chaining setter calls- See Also:
-
getRootCriteriaOnly
public boolean getRootCriteriaOnly()For DataSources that define atree relationshipbetween fields by declaring aforeignKeyon one field that refers to another from that same DataSource, shouldcriteriabe 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
Controls whichvalidators, if any, to include in the fields of the exportedMockDataSource. 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:
MockDSExportSettingsinstance, for chaining setter calls
-
getValidatorMode
Controls whichvalidators, if any, to include in the fields of the exportedMockDataSource. 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"
-