AMT Help Files
homeAMT Developer StudioCode ManagementLionRepository ModuleInterfacesILionGenSet

ILionGenSet

This section details the functions and properties of the AMT Repository Module GenSet interface.

Properties

Name Type Access Description
AllIndexesWithIndexFlags Boolean Read/Write Get or set the Generate All Indexes with an Index Flag in Front property.
DuplicateRecords LionDuplicateRecord
(enum)
Read/Write Get or set the Action on duplicate key inserts property. Allowed values are: LionDuplicateRecord.Abort, LionDuplicateRecord.WarningMessage and LionDuplicateRecord.NoMessage.
GenerateInEdit Boolean Read/Write Get or set the Generate Objects in Edit property. When set to False only the checked in objects will be generated.
GeneratePublicInDebug Boolean Read/Write Get or set the Generate Public Objects In Debug property.
LocalSourceFolder String Read/Write Get or set the Source Folder of the Generation Set.
Name String Read/Write Get or set the name of the Generation Set.
Parameters List<String> Readonly Gets the list of other customer specific parameters.
ScriptSourceFolder String Read/Write Get or set the Script Source folder of the Generation Set.
TargetDatabaseType AmtDatabaseType
(enum)
Read/Write Get or set the Target Database Type property. Allowed values are: AmtDatabaseType.MsSql, AmtDatabaseType.Oracle and AmtDatabaseType.Db2

Functions

Function name Return type Parameters Description
Name Type
GetRevision ILionRevision Object LionObject ILionObject Returns the current revision of the ILionObject Object in this Generation Set as an ILionRevision Object.
GetStatus LionObjectStatus Object LionObject ILionObject

Get the status of the specified ILionObject Object as LionObjectStatus Object. See the LionObjectStatus enumeration below for possible values. The value of the first generator error message will be placed in the out parameter Message.

Message out String
Load Void

Read the genset settings from the Generation Set <Name>.

Note: The name of the Generation Set must be unique, otherwise and exception will be raised.

MarkAsDeleted Void LionObject ILionObject

Mark the Lion Object as deleted.

Application objects can not be marked as deleted.

Note: Before marking a table object as deleted, any indexes belonging to that table must be marked as deleted first. Otherwise an error is thrown by the function.

RemoveGenSet Void

Remove the generation set from the repository.

Save Void

Save the genset settings to the Generation Set <Name>.

Note: The name of the Generation Set must be unique, otherwise and exception will be raised.

SelectRevision Void LionObject ILionObject Select the specified revision to be the active revision in this Generation Set of the specified ILionObject Object.
Revision ILionRevision

Enumerations

Name Type Enumeration
LionObjectStatus Integer
  • Unknown = 0
  • NewObject = 1
  • Validated = 2
  • ValidatedError = 3
  • Generated = 4
  • GeneratedError = 5
  • QueuedForGenerate = 6
  • Changed = 7
  • Canceled = 8
  • QueuedForBuild = 9

Example

C#

ILionGenSet genSet2 = app.GetGenSet("Default from loading source");
Log("Single genset: " + genSet2.Name);

ILionObject report = app.GetLionObject("KOREP", LionObjectType.ReportUser);
ILionRevision revTest = genSet.GetRevision(report);

if (revTest == null) {
  Log("No revision assigned for this generation set");
} else {
  Log("Revision assigned to this genset:" + revTest.Revision);
}

ILionRevision rev15 = report.GetRevision("1.5");
genSet.SelectRevision(report, rev15);

List<String> genParam = genSet2.Parameters;
genParam.Remove("NUMERIC-CODING=ANSI");
genParam.Add("NUMERIC-CODING=UNIX");

genParam.DuplicateRecords = Asysco.Lion.Repository.Containers.LionDuplicateRecord.NoMessage;

genSet2.Save();

PowerShell

$O_Genset = $O_App.GetGenSet("Default from loading source")
Write-Host("Single genset: " + $O_Genset.Name)

$O_Report = $O_App.GetLionObject("KOREP", 208)

$O_RevTest = $O_Genset.GetRevision($O_Report)

if (!$O_RevTest) {
  Write-Host("No revision assigned for this generation set")
} else {
  Write-Host("Revision assigned for this genset: " + $O_RevTest.Revision)
}

$O_Rev15 = $O_Report.GetRevision("1.5")
$O_Genset.SelectRevision($O_Report, $O_Rev15)

$O_GenParam = $O_GenSet.Parameters
$O_GenParam.Remove("NUMERIC-CODING=ANSI")
$O_GenParam.Add("NUMERIC-CODING=UNIX")

$O_Genset.DuplicateRecords = "NoMessage"

$O_GenSet.Save()

Contents

 Go to top