| | This file copyright (c) 2004 SO.MUS.AR. s.a.s. | Subject to the license published at | http://www.somusar.com/contact/poc_request | adventure_package "Adventure package" | | This multi-tier entity features a database table and a logic-tier class. | string package_id[20] "Package Id." string cat_id[20] "Category Id." locale locale "Locale" string location[30] "Location" float price "Price" string name[80] "Name" string description[255] "Description" string image_uri[80] "Image URI" string lodging_id[20] "Lodging Id." list activity activities "Activity list" function set_hotel_item_id "Set lodging" link category category "Category" link lodging lodging "Lodging" --- DEFS ------------------------------------------------------------------ | | Define signature for function set_hotel_item_id (a void | method accepting a lodging identifier). | set_hotel_item_id: lodging_id -> 0 --- DB -------------------------------------------------------------------- | | Define the field set for the database table | of this entity, and define its primary multi-field key. | table: package_id, cat_id, locale, location, price, name, description, image_uri, lodging_id pkey: package_id, locale | | Define set of foreign keys | fkey: category, lodging | Define list of fields that may be null null: name, description | | Define the list of fields to be returned by a select query | query: package_id, name, description, price, location, lodging_id --- LOGIC ----------------------------------------------------------------- | | Define the list of properties for the logic tier class | properties: package_id, name, description, price, location, lodging_id, activities | | Define the list of methods for the logic tier class | methods: set_hotel_item_id | | For some reason the sequence of parameters in the constructor | is required to be different than the list of properties: | hence override the default constructor sequence with an | ad-hoc sequence. | constructor: package_id, name, description, location, lodging_id, price, activities --- UI -------------------------------------------------------------------- | No usage interface for this entity, yet --- ADJUST ---------------------------------------------------------------- | | This entity features a significant number of adjusting | parameters. | | Override default name for the database table as required DB.table.id = "package" | Override default DB type mapping for some fields DB.table.package_id.db_type = "char" DB.table.cat_id.db_type = "char" DB.table.lodging_id.db_type = "char" | Do not generate default logic class constructor for this entity LOGIC.empty_constructor = "false" | Override default attribute (protected) for the logica class members LOGIC.properties.private = "true" | For some reason it is required that property description | can not be "getted": honor that requirement. LOGIC.properties.description.hidden = "true" | Specify that the code for method set_hotel_item_id is hand-written LOGIC.methods.set_hotel_item_id.code = "hand-written"