#
#  this is an additional configuration file for T-PowerTier Persistence
#  file generation 
#
inspector.node.element.*.*.item.Powertier.view.UI = treeTableNodeUI
inspector.node.element.*.*.item.Powertier.condition = hasOption("powertier.showInspector")

inspector.node.element.*.*.item.Powertier.name = "PowerTier"
inspector.node.element.*.Class.item.Powertier.item.tableName = StringField
inspector.node.element.*.Class.item.Powertier.item.tableName.name = "TableName"
inspector.node.element.*.Class.item.Powertier.item.existingTable = BooleanField
inspector.node.element.*.Class.item.Powertier.item.existingTable.name = "ExistingTable"
inspector.node.element.*.Class.item.Powertier.item.readOnly = BooleanField
inspector.node.element.*.Class.item.Powertier.item.readOnly.name = "ReadOnly"
inspector.node.element.*.Class.item.Powertier.item.fileNameRoot = StringField
inspector.node.element.*.Class.item.Powertier.item.fileNameRoot.name = "FileNameRoot"
inspector.node.element.*.Class.item.Powertier.item.distributionOption = ChoiceField(
\   {
\     values := { "", "NotDistributed", "EmptyInterface", "StateReadOnly","StateReadWrite","AllReadOnly","AllReadWrite" }
\   }
\ )
inspector.node.element.*.Class.item.Powertier.item.distributionOption.name = "DistributionOption"


inspector.node.element.*.Attribute.item.Powertier.item.primaryKey = BooleanField
inspector.node.element.*.Attribute.item.Powertier.item.primaryKey.name = "PrimaryKey"
inspector.node.element.*.Attribute.item.Powertier.item.persistentType = ChoiceField (
\  { 
\    values := {"", "char", "short", "int", "long", "binary", "float", "double", "text", "image", "money", "datetime", "OID", "composite"}
\  }
\ )
inspector.node.element.*.Attribute.item.Powertier.item.persistentType.name = "Powertier type"
inspector.node.element.*.Attribute.item.Powertier.item.columnName = StringField
inspector.node.element.*.Attribute.item.Powertier.item.columnName.name = "ColumnName"
inspector.node.element.*.Attribute.item.Powertier.item.columnNames = StringField
inspector.node.element.*.Attribute.item.Powertier.item.columnNames.name = "ColumnNames"
inspector.node.element.*.Attribute.item.Powertier.item.queries = StringField
inspector.node.element.*.Attribute.item.Powertier.item.queries.name = "Queries"
inspector.node.element.*.Attribute.item.Powertier.item.domainMin = StringField
inspector.node.element.*.Attribute.item.Powertier.item.domainMin.name = "DomainMin"
inspector.node.element.*.Attribute.item.Powertier.item.domainMax = StringField
inspector.node.element.*.Attribute.item.Powertier.item.domainMax.name = "DomainMax"
inspector.node.element.*.Attribute.item.Powertier.item.optimisticControl = BooleanField
inspector.node.element.*.Attribute.item.Powertier.item.optimisticControl.name = "OptimisticControl"
inspector.node.element.*.Attribute.item.Powertier.item.defaultValue = StringField
inspector.node.element.*.Attribute.item.Powertier.item.defaultValue.name = "DefaultValue"
inspector.node.element.*.Attribute.item.Powertier.item.nullAllowed = BooleanField
inspector.node.element.*.Attribute.item.Powertier.item.nullAllowed.name = "NullAllowed"
inspector.node.element.*.Attribute.item.Powertier.item.hooks.name = "Hooks"
inspector.node.element.*.Attribute.item.Powertier.item.hooks = ChoiceField(
\   {
\     values := {"", "onDelete","onDBRead","onUpdate","onChange","onOCChange"}
\   }
\ )

inspector.node.element.*.AssociationLink.item.Powertier.item.persistenceRole.name = "Persistence role"
inspector.node.element.*.AssociationLink.item.Powertier.item.persistenceRole = ChoiceField(
\   {
\     values := { "", "ForeignKey", "Relationship" }
\   }
\ )

inspector.node.element.*.AssociationLink.item.Powertier.item.identifying.name = "Identifying"
inspector.node.element.*.AssociationLink.item.Powertier.item.identifying.condition=getProperty("persistenceRole")
\ == "ForeignKey"
inspector.node.element.*.AssociationLink.item.Powertier.item.identifying = BooleanField

inspector.node.element.*.AssociationLink.item.Powertier.item.clientRelationArc.name = "Client relation arc"
inspector.node.element.*.AssociationLink.item.Powertier.item.clientRelationArc.condition=getProperty("persistenceRole")
\ == "Relationship"
inspector.node.element.*.AssociationLink.item.Powertier.item.clientRelationArc = StringField
inspector.node.element.*.AssociationLink.item.Powertier.item.clientCardinality.condition=getProperty("persistenceRole")
\ == "Relationship"
inspector.node.element.*.AssociationLink.item.Powertier.item.clientCardinality.name = "Client cardinality"
inspector.node.element.*.AssociationLink.item.Powertier.item.clientCardinality = ChoiceField(
\  {
\    values := {"0..1", "1", "*", "1..*"}
\  }
\)
inspector.node.element.*.AssociationLink.item.Powertier.item.clientCardinality.name = "Client cardinality"

inspector.node.element.*.AssociationLink.item.Powertier.item.supplierRelationArc.name = "Supplier relation arc"
inspector.node.element.*.AssociationLink.item.Powertier.item.supplierRelationArc.condition=getProperty("persistenceRole")
\ == "Relationship"
inspector.node.element.*.AssociationLink.item.Powertier.item.supplierRelationArc = StringField
inspector.node.element.*.AssociationLink.item.Powertier.item.supplierCardinality.condition=getProperty("persistenceRole")
\ == "Relationship"
inspector.node.element.*.AssociationLink.item.Powertier.item.supplierCardinality.name = "Supplier cardinality"
inspector.node.element.*.AssociationLink.item.Powertier.item.supplierCardinality = ChoiceField(
\  {
\    values := {"0..1", "1", "*", "1..*"}
\  }
\)

inspector.node.element.*.AssociationLink.item.Powertier.item.deleteActionSrc.name = "DeleteActionSrc"
inspector.node.element.*.AssociationLink.item.Powertier.item.deleteActionSrc = ChoiceField(
\   {
\     values := { "", "block", "propagate", "removeRelationPointer" }
\   }
\ )
inspector.node.element.*.AssociationLink.item.Powertier.item.deleteActionSrc.condition = getProperty("persistenceRole")
\ == "Relationship"
inspector.node.element.*.AssociationLink.item.Powertier.item.deleteActionDst.name = "DeleteActionDst"
inspector.node.element.*.AssociationLink.item.Powertier.item.deleteActionDst = ChoiceField(
\   {
\     values := { "", "block", "propagate", "removeRelationPointer" }
\   }
\ )
inspector.node.element.*.AssociationLink.item.Powertier.item.deleteActionDst.condition = getProperty("persistenceRole")
\ == "Relationship"

inspector.node.element.*.ClassDiagram.item.Powertier.item.projDomainName.name = "DomainName"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projDomainName = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projDomainRootFileName.name = "DomainFileName"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projDomainRootFileName = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projDomainOutputDir.name = "DomainOutputDir"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projDomainOutputDir = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projHeaderSuffix.name = "HeaderSuffix"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projHeaderSuffix = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projSourceSuffix.name = "SourceSuffix"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projSourceSuffix = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projRootFileName.name = "RootFileName"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projRootFileName = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projInSubDir.name = "Project in subdir"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projInSubDir = BooleanField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projPackage.name = "Package"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projPackage = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projRWClassIDBase."RWClassIDBase"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projRWClassIDBase = StringField
inspector.node.element.*.ClassDiagram.item.Powertier.item.projGenerationOptions = "Generation Options"
inspector.node.element.*.ClassDiagram.item.Powertier.item.projGenerationOptions = ChoiceField(
\   {
\     values := { "", "C++Mapping", "C++OrbixDistribution", "C++OrbixNotify", "C++OracleDLL", "EJBMapping", "C++OrbixOTS" }
\   }
\ )

;; ConfigEditor pane
optionsEditor.item.Powertier.view.UI = treeTableNodeUI
optionsEditor.item.Powertier.view.expandLevel = 1
optionsEditor.item.Powertier.order = 80
optionsEditor.item.Powertier.view.description="<body>On this page you can define default properties
\for the <b>PowerTier</b> integration plugin and modify the type conversion table.</body>"

powertier.projDomainName = DefaultDomainName
optionsEditor.item.Powertier.item.defaults.name = "Default values"
optionsEditor.item.Powertier.item.defaults.view.description = "<body>Here you can specify default values
\for some fields, for <b>PersistenceProperties</b> record in particular.</body>"
optionsEditor.item.Powertier.item.defaults.item.DomainName.name = "Domain name"
optionsEditor.item.Powertier.item.defaults.item.DomainName = StringField
optionsEditor.item.Powertier.item.defaults.item.DomainName.propertyName = powertier.projDomainName
optionsEditor.item.Powertier.item.defaults.item.DomainName.view.description = "<body>Project domain name used
\if not specified in diagram options.</body>"

powertier.projDomainFileName = DefaultDomainFileName
optionsEditor.item.Powertier.item.defaults.item.DomainFileName.name = "Domain file name"
optionsEditor.item.Powertier.item.defaults.item.DomainFileName = StringField
optionsEditor.item.Powertier.item.defaults.item.DomainFileName.propertyName = powertier.projDomainFileName
optionsEditor.item.Powertier.item.defaults.item.DomainFileName.view.description = "<body>Project domain file name used
\if not specified in diagram options.</body>"

powertier.projDomainOutputDir = 
optionsEditor.item.Powertier.item.defaults.item.DomainOutputDir.name = "Domain output directory"
optionsEditor.item.Powertier.item.defaults.item.DomainOutputDir = FileNameField
optionsEditor.item.Powertier.item.defaults.item.DomainOutputDir.propertyName = powertier.projDomainOutputDir
optionsEditor.item.Powertier.item.defaults.item.DomainOutputDir.view.description = "<body>Project domain output directory
\if not specified in diagram options.</body>"

powertier.projHeaderSuffix = h
optionsEditor.item.Powertier.item.defaults.item.HeaderSuffix.name = "Header suffix"
optionsEditor.item.Powertier.item.defaults.item.HeaderSuffix = StringField
optionsEditor.item.Powertier.item.defaults.item.HeaderSuffix.propertyName = powertier.projHeaderSuffix
optionsEditor.item.Powertier.item.defaults.item.HeaderSuffix.view.description = "<body>Project header files suffix to be used
\if not specified in diagram options.</body>"

powertier.projSourceSuffix = cpp
optionsEditor.item.Powertier.item.defaults.item.SourceSuffix.name = "Source suffix"
optionsEditor.item.Powertier.item.defaults.item.SourceSuffix = StringField
optionsEditor.item.Powertier.item.defaults.item.SourceSuffix.propertyName = powertier.projSourceSuffix
optionsEditor.item.Powertier.item.defaults.item.SourceSuffix.view.description = "<body>Project source files suffix to be used
\if not specified in diagram options.</body>"

powertier.projRootFileName = DefaultRootFilename
optionsEditor.item.Powertier.item.defaults.item.RootFileName.name = "Root file name"
optionsEditor.item.Powertier.item.defaults.item.RootFileName = StringField
optionsEditor.item.Powertier.item.defaults.item.RootFileName.propertyName = powertier.projRootFileName
optionsEditor.item.Powertier.item.defaults.item.RootFileName.view.description = "<body>Project root file name to be used
\if not specified in diagram options.</body>"

powertier.projInSubDir = false
optionsEditor.item.Powertier.item.defaults.item.ProjectInSubdir.name = "Project in subdirectory"
optionsEditor.item.Powertier.item.defaults.item.ProjectInSubdir = BooleanField
optionsEditor.item.Powertier.item.defaults.item.ProjectInSubdir.propertyName = powertier.projInSubDir
optionsEditor.item.Powertier.item.defaults.item.ProjectInSubdir.view.description = "<body>If true, locate generated project in
\a subdirectory. <i>This is not an integration option, but the one used by PowerTier.</i></body>"

powertier.projPackage = default
optionsEditor.item.Powertier.item.defaults.item.Package.name = "Project package"
optionsEditor.item.Powertier.item.defaults.item.Package = StringField
optionsEditor.item.Powertier.item.defaults.item.Package.propertyName = powertier.projPackage
optionsEditor.item.Powertier.item.defaults.item.Package.view.description = "<body>Project package to be used if not specified
\in diagram options.</body>"

powertier.projRWClassIDBase = 0x7000
optionsEditor.item.Powertier.item.defaults.item.Classbase.name "RW Class ID Base"
optionsEditor.item.Powertier.item.defaults.item.Classbase = StringField
optionsEditor.item.Powertier.item.defaults.item.Classbase.propertyName = powertier.projRWClassIDBase
optionsEditor.item.Powertier.item.defaults.item.Classbase.view.description = "<body>A number that specifies base of
\ read-write classes ID. Use 0x prefix for hexadecimal numbers.</body>"

powertier.projGenerationOptions = EJBMapping
optionsEditor.item.Powertier.item.defaults.item.GenerationOption.name = "Project generation options"
optionsEditor.item.Powertier.item.defaults.item.GenerationOption = ChoiceField (
\ {
\     values := { "C++Mapping", "C++OrbixDistribution", "C++OrbixNotify", "C++OracleDLL", "EJBMapping", "C++OrbixOTS" }
\   }
\ )
optionsEditor.item.Powertier.item.defaults.item.GenerationOption.propertyName = powertier.projGenerationOptions
optionsEditor.item.Powertier.item.defaults.item.GenerationOption.view.description = "<body>Mapping to be used if not specified
\otherwise in diagram options.</body>"

optionsEditor.item.Powertier.item.types.name = "Type conversions"
optionsEditor.item.Powertier.item.types.view.description="<body>Here you can specify type conversions for primitive data types
\supported by PowerTier. For example you may want PowerTier <code>datetime</code> type to be mapped from either <code>Date</code>
\or <code>Calendar</code> types.<body>"

powertier.types.char = char
optionsEditor.item.Powertier.item.types.item.char.name = "char"
optionsEditor.item.Powertier.item.types.item.char = StringField
optionsEditor.item.Powertier.item.types.item.char.propertyName = powertier.types.char
optionsEditor.item.Powertier.item.types.item.char.view.description = "<body>Character string. Type keyword: <code>char</code>;
\PowerTier data type: <code>char</code>; Default value for this field: <code>char</code></body>"

powertier.types.short = short
optionsEditor.item.Powertier.item.types.item.short.name = "short"
optionsEditor.item.Powertier.item.types.item.short = StringField
optionsEditor.item.Powertier.item.types.item.short.propertyName = powertier.types.short
optionsEditor.item.Powertier.item.types.item.short.view.description = "<body>Short integer. Type keyword: <code>short</code>;
\PowerTier data type: <code>short</code>; Default value for this field: <code>short</code></body>"

powertier.types.int = int
optionsEditor.item.Powertier.item.types.item.int.name = "int"
optionsEditor.item.Powertier.item.types.item.int = StringField
optionsEditor.item.Powertier.item.types.item.int.propertyName = powertier.types.int
optionsEditor.item.Powertier.item.types.item.int.view.description = "<body>Integer. Type keyword: <code>int</code>;
\PowerTier data type: <code>integer</code>; Default value for this field: <code>int</code></body>"


powertier.types.long = long
optionsEditor.item.Powertier.item.types.item.long.name = "long"
optionsEditor.item.Powertier.item.types.item.long = StringField
optionsEditor.item.Powertier.item.types.item.long.propertyName = powertier.types.long
optionsEditor.item.Powertier.item.types.item.long.view.description = "<body>Long integer. Type keyword: <code>long</code>;
\PowerTier data type: <code>long</code>; Default value for this field: <code>char</code></body>"

powertier.types.binary = int
optionsEditor.item.Powertier.item.types.item.binary.name = "binary"
optionsEditor.item.Powertier.item.types.item.binary = StringField
optionsEditor.item.Powertier.item.types.item.binary.propertyName = powertier.types.binary
optionsEditor.item.Powertier.item.types.item.binary.view.description ="<body>Binary string. Type keyword: <code>binary</code>;
\PowerTier data type: <code>binary</code>; Default value for this field: <code>int</code></body>"

powertier.types.float = float
optionsEditor.item.Powertier.item.types.item.float.name = "float"
optionsEditor.item.Powertier.item.types.item.float = StringField
optionsEditor.item.Powertier.item.types.item.float.propertyName = powertier.types.float
optionsEditor.item.Powertier.item.types.item.float.view.description = "<body>Floating point. Type keyword: <code>float</code>;
\PowerTier data type: <code>float</code>; Default value for this field: <code>float</code></body>"

powertier.types.double = double
optionsEditor.item.Powertier.item.types.item.double.name = "double"
optionsEditor.item.Powertier.item.types.item.double = StringField
optionsEditor.item.Powertier.item.types.item.double.propertyName = powertier.types.double
optionsEditor.item.Powertier.item.types.item.double.view.description = "<body>Longer floating point. Type keyword: <code>double</code>;
\PowerTier data type: <code>double</code>; Default value for this field: <code>double</code></body>"

powertier.types.text = String
optionsEditor.item.Powertier.item.types.item.text.name = "text"
optionsEditor.item.Powertier.item.types.item.text = StringField
optionsEditor.item.Powertier.item.types.item.text.propertyName = powertier.types.text
optionsEditor.item.Powertier.item.types.item.text.view.description = "<body>Large text object. Type keyword: <code>text</code>;
\PowerTier data type: <code>RWCString</code>; Default value for this field: <code>String</code></body>"

powertier.types.image = Object
optionsEditor.item.Powertier.item.types.item.image.name = "image"
optionsEditor.item.Powertier.item.types.item.image = StringField
optionsEditor.item.Powertier.item.types.item.image.propertyName = powertier.types.image
optionsEditor.item.Powertier.item.types.item.image.view.description = "<body>Large binary object. Type keyword: <code>image</code>;
\PowerTier data type: <code>PS_Blob</code>; Default value for this field: <code>Object</code></body>"

powertier.types.money = int
optionsEditor.item.Powertier.item.types.item.money.name = "money"
optionsEditor.item.Powertier.item.types.item.money = StringField
optionsEditor.item.Powertier.item.types.item.money.propertyName = powertier.types.money
optionsEditor.item.Powertier.item.types.item.money.view.description = "<body>Money type. Type keyword: <code>money</code>;
\PowerTier data type: <code>PS_Money</code>; Default value for this field: <code>int</code></body>"

powertier.types.datetime = Date
optionsEditor.item.Powertier.item.types.item.datetime.name = "datetime"
optionsEditor.item.Powertier.item.types.item.datetime = StringField
optionsEditor.item.Powertier.item.types.item.datetime.propertyName = powertier.types.datetime
optionsEditor.item.Powertier.item.types.item.datetime.view.description = "<body>Date type. Type keyword: <code>date</code>;
\PowerTier data type: <code>RWTime</code>; Default value for this field: <code>Date</code></body>"

powertier.types.OID = long
optionsEditor.item.Powertier.item.types.item.OID.name = "OID"
optionsEditor.item.Powertier.item.types.item.OID = StringField
optionsEditor.item.Powertier.item.types.item.OID.propertyName = powertier.types.OID
optionsEditor.item.Powertier.item.types.item.OID.view.description = "<body>PowerTier key type. Type keyword: <code>OID</code>;
\PowerTier data type: <code>PS_Oid</code>; Default value for this field: <code>long</code></body>"

powertier.types.composite = Object
optionsEditor.item.Powertier.item.types.item.composite.name = "composite"
optionsEditor.item.Powertier.item.types.item.composite = StringField
optionsEditor.item.Powertier.item.types.item.composite.propertyName = powertier.types.composite
optionsEditor.item.Powertier.item.types.item.composite.view.description = "<body>Composite data type. Type keyword: <code>composite</code>;
\PowerTier data type: <code>composite</code>; Default value for this field: <code>Object</code></body>"

powertier.showInspector = true
optionsEditor.item.Powertier.item.showInspector.name = "Show inspector page"
optionsEditor.item.Powertier.item.showInspector = BooleanField
optionsEditor.item.Powertier.item.showInspector.name = "Show inspector page"
optionsEditor.item.Powertier.item.showInspector.propertyName = powertier.showInspector
optionsEditor.item.Powertier.item.showInspector.view.description = "<body>Show Powertier tab in the
\object inspector</body>"

