Each exposed JADE class is:
Generated as a single Class-name.cs C# class file
Generated in the namespace Exposure-name
Inherits from JoobObject as the base class
Contains a constructor to create an object as a transient or persistent JADE object
Contains exposed properties, methods, and constants
If the exposed JADE class is a subclass of another exposed JADE class, the class hierarchy is retained in the C# definition; for example, if SubClass1 is a subclass of Class1 in the JADE definition, the C# class SubClass1 is derived from Class1.
The following example shows an exposed JADE class.
[System.Runtime.Serialization.KnownTypeAttribute(typeof(Tender))] [System.Runtime.Serialization.DataContractAttribute(IsReference=true)] [System.ComponentModel.DataAnnotations.MetadataTypeAttribute(typeof (TenderSaleMetadata))] [JadeSoftware.Joob.Client.JoobClassAttribute("TenderSale", "RootSchema.CommonSchema.ErewhonInvestmentsModelSchema", ClassNamespace="ErewhonTesting")] [JadeSoftware.Joob.Metadata.JomlTypeAttribute (JadeSoftware.Joob.Metadata.JomlTypeKind.Class, "TenderSale", typeof JoobObject))] public partial class TenderSale: Sale { private static TenderSaleMetadata _metaModel; partial void _initialize(); static TenderSale() { _metaModel = MetadataCache<TenderSaleMetadata>.GetData(null); } public TenderSale(): this(JadeSoftware.Joob.ClassPersistence.Persistent) { } public TenderSale(JadeSoftware.Joob.ClassPersistence lifetime): base(lifetime, typeof(TenderSale), _metaModel.metaClass) { this._initialize(); } protected TenderSale(JadeSoftware.Joob.ClassPersistence lifetime, System.Type type, JadeSoftware.Joob.ClassMetadata metaClass): base(lifetime, type, metaClass) { this._initialize(); } #region Jade Properties #region Jade Methods #region Jade Constants }
The generated classes are decorated with a number of attributes, which are used by the JADE engine to ensure correct and consistent access to the class in the JADE database. For each exposed class, an additional class is generated, which is used internally to ensure consistency between the JADE database definition and the C# definition. The name of this class is formed by appending Metadata to the name of the exposed class. For example, if the TenderSale class is exposed, the class is named TenderSaleMetadata.
The generated classes are decorated with a number of attributes, which are used by the JADE engine to ensure correct and consistent access to the class in the JADE database. For each exposed class, an additional class is generated, which is used internally to ensure consistency between the JADE database definition and the C# definition. The name of this class is formed by appending Metadata to the name of the exposed class. For example, if the TenderSale class is exposed, the class is named TenderSaleMetadata.