Package de.mid.innovator.srv2api.icw2db
Class DBTableColumnHelper
- java.lang.Object
-
- de.mid.innovator.srv2api.icw2db.DBTableColumnHelper
-
public abstract class DBTableColumnHelper extends java.lang.ObjectThis 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 DBTableColumncreate(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer)Create a new Table Column with template and container.static DBTableColumncreate(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 aDBTableColumnfor the givenERAttribute(ER element) in the givenDBTable(DB element).
This standard mapping creates aMEMappingDependencywith the attribute as requirement element and with the newly created table column as implementation element.static DBTableColumncreateByUnique(SrvContext srvCtx, ELContainerAble ohContainer, IMProperty ohReferencedProperty)Creates a foreign key column for a given unique key column.static voidSDT2DTD(SrvContext srvCtx, java.util.List<? extends DBTableColumn> seqCol)This method transform the type of each givenDBTableColumnfromIMSemanticDataTypetoIMDataTypeDefinition.
-
-
-
Method Detail
-
createByER
public static java.util.List<DBTableColumn> createByER(SrvContext srvCtx, ELContainerAble ohDBElement, MENamedElement ohERElement) throws InoNetException, SrvErrorException
This method creates aDBTableColumnfor the givenERAttribute(ER element) in the givenDBTable(DB element).
This standard mapping creates aMEMappingDependencywith 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, aIMSemanticDataTypeused 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:
InoNetExceptionSrvErrorException
-
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:
InoNetExceptionSrvErrorException
-
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:
InoNetExceptionSrvErrorException
-
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:
InoNetExceptionSrvErrorException
-
SDT2DTD
public static void SDT2DTD(SrvContext srvCtx, java.util.List<? extends DBTableColumn> seqCol) throws InoNetException, SrvErrorException
This method transform the type of each givenDBTableColumnfromIMSemanticDataTypetoIMDataTypeDefinition.- Parameters:
srvCtx- The context of the related innovator server.seqCol- Table Columns- Throws:
InoNetExceptionSrvErrorException
-
-