Package com._1c.g5.v8.dt.dcs.dataset
Class DataSetWrapperBase<T extends DataSet>
- java.lang.Object
-
- com._1c.g5.v8.dt.dcs.dataset.DataSetWrapperBase<T>
-
- All Implemented Interfaces:
IDataSetWrapper
- Direct Known Subclasses:
DataSetsWrapperBase
public abstract class DataSetWrapperBase<T extends DataSet> extends Object implements IDataSetWrapper
Base implementation ofIDataSetWrapper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.dcs.dataset.IDataSetWrapper
IDataSetWrapper.FieldRestriction, IDataSetWrapper.FieldSynonym
-
-
Field Summary
Fields Modifier and Type Field Description protected T
dataSet
protected DataSetsFieldsTree
fieldsTree
protected Map<DataSetField,IDataSetFieldsWrapper>
fieldsWrappers
protected Map<String,IDataSetFieldsWrapper>
fieldsWrappersByName
protected Map<String,IDataSetWrapper.FieldRestriction>
restrictions
protected Map<String,IDataSetWrapper.FieldSynonym>
synonyms
-
Constructor Summary
Constructors Constructor Description DataSetWrapperBase(T dataSet)
Constructor
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.dcs.dataset.IDataSetWrapper
copyField, getCurrentAlias, getCurrentLanguageCode, removeField, setFieldAttrUseRestiction, setFieldName, setFieldPath, setFieldTitle, setFieldUseRestiction
-
-
-
-
Field Detail
-
fieldsTree
protected DataSetsFieldsTree fieldsTree
-
fieldsWrappers
protected Map<DataSetField,IDataSetFieldsWrapper> fieldsWrappers
-
fieldsWrappersByName
protected Map<String,IDataSetFieldsWrapper> fieldsWrappersByName
-
synonyms
protected Map<String,IDataSetWrapper.FieldSynonym> synonyms
-
restrictions
protected Map<String,IDataSetWrapper.FieldRestriction> restrictions
-
-
Method Detail
-
init
public void init()
Description copied from interface:IDataSetWrapper
Initialize- Specified by:
init
in interfaceIDataSetWrapper
-
addField
public void addField(DataSetField currentField, DataSetField field) throws DcsPathException
Description copied from interface:IDataSetWrapper
Add field- Specified by:
addField
in interfaceIDataSetWrapper
- Parameters:
currentField
- current field, can benull
field
- field, can't benull
- Throws:
DcsPathException
-
fillDataSetFields
public V8Commands.CompoundV8Command fillDataSetFields(List<DcsDataSetInfoAvailableFieldInfo> avialableFields)
FillsDataSet.getFields()
fromDcsDataSetInfoAvailableFieldInfo
fields- Parameters:
avialableFields
-DcsDataSetInfoAvailableFieldInfo
fields for creating DataSetField by them, can't benull
- Returns:
V8Commands.CompoundV8Command
with information of changing ofDataSet
, nevernull
-
moveField
public void moveField(DataSetField field, String parentPathNew)
Description copied from interface:IDataSetWrapper
Move field- Specified by:
moveField
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
parentPathNew
- destination folder path ornull
(empty) for root
-
getFieldsWrappers
public Collection<IDataSetFieldsWrapper> getFieldsWrappers()
Description copied from interface:IDataSetWrapper
Get fields wrappers- Specified by:
getFieldsWrappers
in interfaceIDataSetWrapper
- Returns:
- collection of fields wrappers, never
null
-
getChildFields
public List<DataSetField> getChildFields(DataSetField parentField)
Description copied from interface:IDataSetWrapper
Get child fields or root fields- Specified by:
getChildFields
in interfaceIDataSetWrapper
- Parameters:
parentField
- parent field, can't benull
- Returns:
- list of fields, never
null
-
getFieldName
public String getFieldName(DataSetField field)
Description copied from interface:IDataSetWrapper
Get 'Field' property of field- Specified by:
getFieldName
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- value of 'Field' property
name from source, never
null
, empty for folder
-
getFieldParentPath
public String getFieldParentPath(DataSetField field)
Description copied from interface:IDataSetWrapper
Get path of field parent- Specified by:
getFieldParentPath
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- path of field parent, can be
null
-
getAncestorField
public DataSetField getAncestorField(DataSetField field)
Description copied from interface:IDataSetWrapper
Get ancestor for field- Specified by:
getAncestorField
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- ancestor if exists or
null
-
getFieldSynonym
public IDataSetWrapper.FieldSynonym getFieldSynonym(String path)
Description copied from interface:IDataSetWrapper
Get field synonym- Specified by:
getFieldSynonym
in interfaceIDataSetWrapper
- Parameters:
path
- path of field, can't benull
- Returns:
- synonym or
null
-
getFieldRestriction
public IDataSetWrapper.FieldRestriction getFieldRestriction(String path)
Description copied from interface:IDataSetWrapper
Get field restriction- Specified by:
getFieldRestriction
in interfaceIDataSetWrapper
- Parameters:
path
- path of field, can't benull
- Returns:
- restriction or
null
-
getField
public DataSetField getField(String path)
Description copied from interface:IDataSetWrapper
Get field- Specified by:
getField
in interfaceIDataSetWrapper
- Parameters:
path
- field path, can't benull
- Returns:
- field or
null
if field not found
-
getFieldPath
public String getFieldPath(DataSetField field)
Description copied from interface:IDataSetWrapper
Get 'Data path' property of field- Specified by:
getFieldPath
in interfaceIDataSetWrapper
- Parameters:
field
- field, can't benull
- Returns:
- value of 'Data path' property, never
null
-
createPath
public DcsPath createPath(String path) throws IDataSetFieldsWrapper.FieldRenameException
Description copied from interface:IDataSetWrapper
Create path from string- Specified by:
createPath
in interfaceIDataSetWrapper
- Parameters:
path
- string path, nevernull
- Returns:
- DCS path, never
null
- Throws:
IDataSetFieldsWrapper.FieldRenameException
- if path is not valid
-
createFieldWrapper
protected IDataSetFieldsWrapper createFieldWrapper(DataSetField field)
Create field wrapper- Parameters:
field
- field, can't benull
- Returns:
- wrapper or
null
if field type unknown
-
fillFieldsWrappers
protected void fillFieldsWrappers(List<DataSetField> fields)
Fills wrapper fields- Parameters:
fields
- fields for wrapping, can't benull
-
addFieldWrapper
protected void addFieldWrapper(IDataSetFieldsWrapper fieldWrapper)
Add field wrapper- Parameters:
fieldWrapper
- wrapper, can't benull
-
-