Package de.mid.innovator.srv2api.icw2db
Class DBTableColumnHelper
- java.lang.Object
-
- de.mid.innovator.srv2api.icw2db.DBTableColumnHelper
-
public abstract class DBTableColumnHelper extends java.lang.Object
This is a utility class for DBTableColumn that provides static methods for creation or other purposes.- See Also:
DBTableColumn
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DBTableColumn
create(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer)
Create a new Table Column with template and container.static DBTableColumn
create(SrvContext srvCtx, MMStereotype ohStereotype, ELContainerAble ohContainer)
Create a new Table Column with stereotype and container.static java.util.List<DBTableColumn>
createByER(SrvContext srvCtx, ELContainerAble ohDBElement, MENamedElement ohERElement)
This method creates aDBTableColumn
for the givenERAttribute
(ER element) in the givenDBTable
(DB element).
This standard mapping creates aMEMappingDependency
with the attribute as requirement element and with the newly created table column as implementation element.static DBTableColumn
createByUnique(SrvContext srvCtx, ELContainerAble ohContainer, IMProperty ohReferencedProperty)
Creates a foreign key column for a given unique key column.static void
SDT2DTD(SrvContext srvCtx, java.util.List<? extends DBTableColumn> seqCol)
This method transform the type of each givenDBTableColumn
fromIMSemanticDataType
toIMDataTypeDefinition
.
-
-
-
Method Detail
-
createByER
public static java.util.List<DBTableColumn> createByER(SrvContext srvCtx, ELContainerAble ohDBElement, MENamedElement ohERElement) throws InoNetException, SrvErrorException
This method creates aDBTableColumn
for the givenERAttribute
(ER element) in the givenDBTable
(DB element).
This standard mapping creates aMEMappingDependency
with the attribute as requirement element and with the newly created table column as implementation element. The mapping dependency is marked as 'maintaining' for further automatic mapping maintenance.
If necessary, aIMSemanticDataType
used by the attribute will be mapped into a corresponding semantic data type used by the new table column.- Parameters:
srvCtx
- The context of the related innovator server.ohDBElement
- Target DB Element for evaluating the owner for the new elementohERElement
- Requirement element of the ER Model- Throws:
InoNetException
SrvErrorException
-
createByUnique
public static DBTableColumn createByUnique(SrvContext srvCtx, ELContainerAble ohContainer, IMProperty ohReferencedProperty) throws InoNetException, SrvErrorException
Creates a foreign key column for a given unique key column. If possible, name and stereotype will be derived from the unique key column.- Parameters:
srvCtx
- The context of the related innovator server.ohContainer
- Container of the new elementohReferencedProperty
- Referenced Property (Primary) as Copy Source- Throws:
InoNetException
SrvErrorException
-
create
public static DBTableColumn create(SrvContext srvCtx, MMStereotype ohStereotype, ELContainerAble ohContainer) throws InoNetException, SrvErrorException
Create a new Table Column with stereotype and container.- Parameters:
srvCtx
- The context of the related innovator server.ohStereotype
- Stereotype for the new elementohContainer
- Container for the new element- Throws:
InoNetException
SrvErrorException
-
create
public static DBTableColumn create(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer) throws InoNetException, SrvErrorException
Create a new Table Column with template and container.- Parameters:
srvCtx
- The context of the related innovator server.ohTemplate
- Template for the new elementohContainer
- Container for the new element- Throws:
InoNetException
SrvErrorException
-
SDT2DTD
public static void SDT2DTD(SrvContext srvCtx, java.util.List<? extends DBTableColumn> seqCol) throws InoNetException, SrvErrorException
This method transform the type of each givenDBTableColumn
fromIMSemanticDataType
toIMDataTypeDefinition
.- Parameters:
srvCtx
- The context of the related innovator server.seqCol
- Table Columns- Throws:
InoNetException
SrvErrorException
-
-