Class DataSetsFieldsWrapperBase<T extends DataSetField>
java.lang.Object
com._1c.g5.v8.dt.dcs.dataset.fields.DataSetsFieldsWrapperBase<T>
- All Implemented Interfaces:
IDataSetFieldsWrapper,Comparable<IDataSetFieldsWrapper>
- Direct Known Subclasses:
DataSetsFieldsWrapperField,DataSetsFieldsWrapperWithChildrenBase
public abstract class DataSetsFieldsWrapperBase<T extends DataSetField>
extends Object
implements IDataSetFieldsWrapper
Base class for field wrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.dcs.dataset.fields.IDataSetFieldsWrapper
IDataSetFieldsWrapper.FieldCommand, IDataSetFieldsWrapper.FieldRenameException -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataSetsFieldsWrapperBase(IDataSetWrapper dataSetWrapper, T field) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IDataSetFieldsWrapper other) protected StringGet current language codeprotected StringgetDuplicatedErrorMessage(List<String> fieldsDuplicated) Create message for duplicated fieldsgetField()Get fieldprotected DataSetFieldgetFieldByPath(String path) Get field by pathprotected Collection<IDataSetFieldsWrapper>Get fields wrappers for this data setprotected StringGet path of field parentprotected DcsPathgetPathFromString(String path) Create DcsPath from textprotected IDataSetWrapper.FieldSynonymgetSynonym(String path) Get field synonym by pathGet title for current languagebooleanisFolder()Check whether field is folderprotected booleanisNameUnique(String name) Check whether name is uniqueprotected booleanisPathUnique(String path) Check whether path is uniqueprotected booleanisStringEquals(String value1, String value2) Check whether strings equalsetTitle(LocalString local) Set titleprotected IDataSetFieldsWrapper.FieldCommandSet titleprotected booleanstartsWith(String value1, String value2) Check whether begining of string equals another stringprotected voidthrowError(String error) Throw renaming exceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.v8.dt.dcs.dataset.fields.IDataSetFieldsWrapper
copy, getName, getPath, getTitle, isTitleAuto, remove, setName, setPath, setTitle
-
Field Details
-
field
-
dataSetWrapper
-
-
Constructor Details
-
DataSetsFieldsWrapperBase
Constructor- Parameters:
dataSetWrapper- data set wrapper, can't be nullfield- field, can't be null
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<T extends DataSetField>
-
getField
Description copied from interface:IDataSetFieldsWrapperGet field- Specified by:
getFieldin interfaceIDataSetFieldsWrapper- Returns:
- field, never null
-
getTitle
Description copied from interface:IDataSetFieldsWrapperGet title for current language- Specified by:
getTitlein interfaceIDataSetFieldsWrapper- Returns:
- title, never null
-
setTitle
Description copied from interface:IDataSetFieldsWrapperSet title- Specified by:
setTitlein interfaceIDataSetFieldsWrapper- Parameters:
local- title, can't be null- Returns:
- command, never null
-
isFolder
public boolean isFolder()Description copied from interface:IDataSetFieldsWrapperCheck whether field is folder- Specified by:
isFolderin interfaceIDataSetFieldsWrapper- Returns:
- whether field is folder
-
setTitle
Set title- Parameters:
langTitle- title for current language, can't be nulllanguageCode- current language code, can't be null- Returns:
- command, never null
-
isNameUnique
Check whether name is unique- Parameters:
name- name, can't be null- Returns:
- whether name is unique
-
isPathUnique
Check whether path is unique- Parameters:
path- path, can't be null- Returns:
- whether path is unique
-
isStringEquals
Check whether strings equal- Parameters:
value1- string, can be nullvalue2- other string, can be null- Returns:
- whether strings is equals
-
startsWith
Check whether begining of string equals another string- Parameters:
value1- string, can be nullvalue2- other string, can be null- Returns:
- whether begining of string equals another string
-
getDuplicatedErrorMessage
Create message for duplicated fields- Parameters:
fieldsDuplicated- fields names, can't be null- Returns:
- message, never null
-
getCurrentLanguageCode
Get current language code- Returns:
- language code, never null
-
throwError
Throw renaming exception- Parameters:
error- error text- Throws:
IDataSetFieldsWrapper.FieldRenameException
-
getPathFromString
Create DcsPath from text- Parameters:
path- path text, can't be null- Returns:
- DcsPath
- Throws:
IDataSetFieldsWrapper.FieldRenameException- if path is not valid
-
getSynonym
Get field synonym by path- Parameters:
path- path, can't be null- Returns:
- synonym, never null
-
getFieldsWrappers
Get fields wrappers for this data set- Returns:
- collection of fields wrappers, never null
-
getParentPath
Get path of field parent- Returns:
- path of field parent
-
getFieldByPath
Get field by path- Parameters:
path- field path, can't be null- Returns:
- field or null if field not found
-