You can load a schema file containing a new definition of a schema that already exists in your JADE database.
When you perform a load, the existing schema is updated to match the definition in the schema file. Specifically, the following actions are performed.
New schema elements (for example, global constants, classes, interfaces, methods, or properties) are added.
Changed schema elements are updated.
Schema elements that are present in the database but not in the schema file are deleted, subject to user confirmation. For more details, see "Specifying Advanced Load Options", later in this chapter.
An application in the database that is used in a package but is not in the schema file is not deleted.
For example, consider the following two definitions of a class (one in the JADE database and the other in the incoming schema file).
Database | Schema File |
---|---|
Customer | Customer |
Attributes | ( |
address: String[31]; | attributeDefinitions |
balance: Decimal[12,2]; | balance: Decimal[12,2]; |
customerNumber: Integer; | customerNumber: Integer; |
longName: String[21]; | longName: String[31]; |
phone: String[16]; | |
JADE Methods | |
compareDetails(cust: Customer); | jadeMethodDefinitions |
display(): String; | display(): String; |
printOn(f: Form); | |
) |
In this example, the following actions are performed during the load process.
balance, customerNumber, and display are unchanged
phone and printOn are new, so they are added to the existing class
The length of longName has been changed from 21 to 31, so this change is applied
address and compareDetails are not defined in the schema file, so they are deleted from the class
The class that exists in the database is modified so that it becomes identical to the schema file definition.