//DDB-FileStart
//DDB-HeaderStart

// File Name : STYLE.DD
// Class Name: Style_DataDictionary
// Revision  : 5
// Version   : 2

Use  Windows           // Basic Definitions
Use  DataDict          // DataDictionary Class Definition
Use  DDvalTbl          // Validation Table Class Definitions

Open Style

//DDB-HeaderEnd
//DDB-ValidationStart

Register_Object Style_Type_VT

Object Style_Type_VT  is a CodeValidationTable
    Set Type_Value        To "STY_TYP"
    //DDB-ValidationCustomStart
    //DDB-ValidationCustomEnd
End_Object   // Style_Type_VT
//DDB-ValidationEnd

Class Style_DataDictionary  is a DataDictionary
 
    Procedure Update
        Forward Send Update
        SysDate Style.Updated   
        Increment Style.Revision
    End_Procedure   // Update
 
    Procedure Creating
        Forward Send Creating
        SySDate4 Style.Created     
        Move 0 to Style.Revision
        Move "Y" to Style.Publish
    End_Procedure   // Creating
 

    // Define_Fields:
    // This procedure is used to set up all data-dictionary rules.

    Procedure Define_Fields
        Forward Send Define_Fields
        //DDB-Generated-Code-Location
        //DDB-DefineFieldStart

        Set Main_File            To Style.File_Number

        Set Foreign_Field_Options  DD_KEYFIELD   To DD_AUTOFIND    DD_NOPUT       DD_FINDREQ    
        Set Foreign_Field_Options  DD_INDEXFIELD To DD_NOPUT       DD_FINDREQ    
        Set Foreign_Field_Options  DD_DEFAULT    To DD_DISPLAYONLY

        // Field-based properties.......................

        // Style.Style_Id          
        Set Field_Options          Field Style.Style_Id           To DD_REQUIRED   

        // Style.Description       

        // Style.Type              
        Set Field_Value_Table      Field Style.Type               To (Style_Type_VT(Self))

        // Style.Pre_Html          

        // Style.Post_Html         

        // Style.Classid           

        // Style.Style             

        // Style.Revision          

        // Style.Publish           

        // Style.Created           

        // Style.Created_User      

        // Style.Updated           

        // Style.Updated_User      

        //DDB-DefineFieldEnd
    End_Procedure    // Define_Fields

    // Field_Defaults:
    // This procedure is used to establish default field values.

    Procedure Field_Defaults
        Forward Send Field_Defaults
        //DDB-Generated-Code-Location
        //DDB-FieldDefaultStart
        //DDB-FieldDefaultEnd
    End_Procedure    // Field_Defaults

End_Class    // Style_DataDictionary
//DDB-FileEnd
