Class DbViewUtil
java.lang.Object
com._1c.g5.v8.dt.metadata.dbview.util.DbViewUtil
Utility class for DBView definitions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllTables(MdObject mdObject) Gets all not null db tables for givenMdObjectstatic BasicDbViewDefsgetBasicDbViewDefs(MdObject mdObject) static List<DbViewFieldDef>getFields(org.eclipse.emf.ecore.EObject context, DbViewFieldDef field) Returns fields from dbviews provided by field types or empty list.static Collection<DbViewFieldDef>getFieldsByType(Type type, boolean skipTables) Returns fields list by type for all visible dbViews.static List<DbViewFieldDef>getFieldsByTypeDescription(org.eclipse.emf.ecore.EObject context, TypeDescription typeDescription) Returns fields provided by type description or empty list.static Map<String,DbViewFieldDef> getFieldsByTypeDescriptionAsMap(org.eclipse.emf.ecore.EObject context, TypeDescription typeDescription) Returns fields provided by type description or empty map.static DbViewTableDefgetMainDbViewDef(TypeItem type) Returns tables list by type.static DbViewDefgetMainTable(MdObject mdObject) Get Main table forMdObjectstatic Collection<DbViewTableDef>getObjectDefs(Type type) static List<DbViewFieldDef>getRlsFields(Object input) Returns object fields for rls.
-
Constructor Details
-
DbViewUtil
public DbViewUtil()
-
-
Method Details
-
getFields
public static List<DbViewFieldDef> getFields(org.eclipse.emf.ecore.EObject context, DbViewFieldDef field) Returns fields from dbviews provided by field types or empty list.- Parameters:
context- the context object to figure out execution scopefield- theDbViewFieldDef(notnull).- Returns:
- fields from dbviews provided by field types or empty list.
-
getFieldsByTypeDescription
public static List<DbViewFieldDef> getFieldsByTypeDescription(org.eclipse.emf.ecore.EObject context, TypeDescription typeDescription) Returns fields provided by type description or empty list.- Parameters:
context- the context object to figure out execution scopetypeDescription- theTypeDescription(may benull)- Returns:
- fields from dbviews provided by field types or empty list.
-
getFieldsByTypeDescriptionAsMap
public static Map<String,DbViewFieldDef> getFieldsByTypeDescriptionAsMap(org.eclipse.emf.ecore.EObject context, TypeDescription typeDescription) Returns fields provided by type description or empty map.- Parameters:
context- the context object to figure out execution scopetypeDescription- theTypeDescription(may benull)- Returns:
- fields from dbviews provided by field types or empty map.
-
getFieldsByType
Returns fields list by type for all visible dbViews.- Parameters:
type- type (notnull)skipTables- if true all tabular section fields will be filtered out- Returns:
- fields list or empty list.
-
getObjectDefs
-
getMainTable
Get Main table forMdObject- Parameters:
mdObject- the source metadata object, cannot benull- Returns:
- the Main
Tablefor given mdObject, ornullif no table find
-
getAllTables
Gets all not null db tables for givenMdObject- Parameters:
mdObject- the source metadata object, cannot benull- Returns:
- list of all not null
DbViewDeffor given mdObject, nevernull
-
getBasicDbViewDefs
-
getMainDbViewDef
Returns tables list by type.- Parameters:
type- type (notnull)- Returns:
- tables, contained in type
-
getRlsFields
Returns object fields for rls.- Parameters:
input- the input object, cannot benull- Returns:
- the list rls fields
-