Package de.mid.innovator.srv2api.icw2db
Class DBForeignKeyHelper
- java.lang.Object
-
- de.mid.innovator.srv2api.icw2db.DBForeignKeyHelper
-
public abstract class DBForeignKeyHelper extends java.lang.ObjectThis is a utility class for DBForeignKey that provides static methods for creation or other purposes.- See Also:
DBForeignKey
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DBForeignKeycreate(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer, ELElement ohRequirement)Create a new Foreign Key (of Table) with template and container with requirement.static DBForeignKeycreate(SrvContext srvCtx, MMStereotype ohStereotype, ELContainerAble ohContainer, ELElement ohRequirement)Create a new Foreign Key (of Table) with stereotype and container with requirement.static DBForeignKeycreateAndMaintain(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer, ELElement ohRequirement)Create a new Foreign Key (of Table) with template and container with requirement.static DBForeignKeycreateAndMaintain(SrvContext srvCtx, MMStereotype ohStereotype, ELContainerAble ohContainer, ELElement ohRequirement)Create a new Foreign Key (of Table) with stereotype and container with requirement.static java.util.List<DBForeignKey>createByER(SrvContext srvCtx, ELContainerAble ohDBElement, MENamedElement ohERElement)This method creates (if possible) aDBForeignKeyfor the givenERForeignKey(ER element) in the givenDBTable(DB element).static DBTablemergeSiblingTables(SrvContext srvCtx, java.util.List<? extends ELElement> seq)Merges two or more sibling database tables of the given foreign keys.static java.util.List<DBTable>mergeToForeign(SrvContext srvCtx, java.util.List<? extends ELElement> seq)Merges theDBTablewhich contains theDBUniqueKeycorresponding to the selectedDBForeignKeyinto theDBTablewhich contains the foreign key.
This action creates aDBMergedTablein the modified table.static java.util.List<DBTable>mergeToUnique(SrvContext srvCtx, java.util.List<? extends DBForeignKey> seqForeign, java.util.List<java.lang.Integer> seqCard)Merges theDBTableof the selectedDBForeignKeyinto theDBTablewhich contains the correspondingDBUniqueKey.
This action creates aDBMergedTablein the modified table.
-
-
-
Method Detail
-
createByER
public static java.util.List<DBForeignKey> createByER(SrvContext srvCtx, ELContainerAble ohDBElement, MENamedElement ohERElement) throws InoNetException, SrvErrorException
This method creates (if possible) aDBForeignKeyfor the givenERForeignKey(ER element) in the givenDBTable(DB element). It could be impossible to create the foreign key, if the referenced unique key does not exist in the DB model.
This standard mapping creates aMEMappingDependencywith the ER key as requirement element and with the newly created DB key as implementation element. The mapping dependency is marked as 'maintaining' for further automatic mapping maintenance.- 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
-
mergeSiblingTables
public static DBTable mergeSiblingTables(SrvContext srvCtx, java.util.List<? extends ELElement> seq) throws InoNetException, SrvErrorException
Merges two or more sibling database tables of the given foreign keys. The foreign keys must be identifying and maximum 1, and must reference the same primary key.
This action creates aDBMergedTablein the modified table.- Parameters:
srvCtx- The context of the related innovator server.seq- List of ELElement- Throws:
InoNetExceptionSrvErrorException
-
mergeToForeign
public static java.util.List<DBTable> mergeToForeign(SrvContext srvCtx, java.util.List<? extends ELElement> seq) throws InoNetException, SrvErrorException
Merges theDBTablewhich contains theDBUniqueKeycorresponding to the selectedDBForeignKeyinto theDBTablewhich contains the foreign key.
This action creates aDBMergedTablein the modified table.- Parameters:
srvCtx- The context of the related innovator server.seq- List of ELElement- Throws:
InoNetExceptionSrvErrorException
-
mergeToUnique
public static java.util.List<DBTable> mergeToUnique(SrvContext srvCtx, java.util.List<? extends DBForeignKey> seqForeign, java.util.List<java.lang.Integer> seqCard) throws InoNetException, SrvErrorException
Merges theDBTableof the selectedDBForeignKeyinto theDBTablewhich contains the correspondingDBUniqueKey.
This action creates aDBMergedTablein the modified table.- Parameters:
srvCtx- The context of the related innovator server.seqForeign- foreign keysseqCard- cardinalities for merge- Throws:
InoNetExceptionSrvErrorException
-
create
public static DBForeignKey create(SrvContext srvCtx, MMStereotype ohStereotype, ELContainerAble ohContainer, ELElement ohRequirement) throws InoNetException, SrvErrorException
Create a new Foreign Key (of Table) with stereotype and container with requirement.- Parameters:
srvCtx- The context of the related innovator server.ohStereotype- Stereotype for the new elementohContainer- Container for the new elementohRequirement- Additional required element- Throws:
InoNetExceptionSrvErrorException
-
create
public static DBForeignKey create(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer, ELElement ohRequirement) throws InoNetException, SrvErrorException
Create a new Foreign Key (of Table) with template and container with requirement.- Parameters:
srvCtx- The context of the related innovator server.ohTemplate- Template for the new elementohContainer- Container for the new elementohRequirement- Additional required element- Throws:
InoNetExceptionSrvErrorException
-
createAndMaintain
public static DBForeignKey createAndMaintain(SrvContext srvCtx, MMStereotype ohStereotype, ELContainerAble ohContainer, ELElement ohRequirement) throws InoNetException, SrvErrorException
Create a new Foreign Key (of Table) with stereotype and container with requirement. The created element is maintained.- Parameters:
srvCtx- The context of the related innovator server.ohStereotype- Stereotype for the new elementohContainer- Container for the new elementohRequirement- Additional required element- Throws:
InoNetExceptionSrvErrorException
-
createAndMaintain
public static DBForeignKey createAndMaintain(SrvContext srvCtx, MMCreateTemplate ohTemplate, ELContainerAble ohContainer, ELElement ohRequirement) throws InoNetException, SrvErrorException
Create a new Foreign Key (of Table) with template and container with requirement. The created element is maintained.- Parameters:
srvCtx- The context of the related innovator server.ohTemplate- Template for the new elementohContainer- Container for the new elementohRequirement- Additional required element- Throws:
InoNetExceptionSrvErrorException
-
-