ice.NET business objects control file reference

As described on the page , the business object builder needs a business objects control file to generate the business object implementations. On this page you can see a visualization of the XML schema and you can download the schema to validate your business objects control file, and to get an overview which elements are present.

Download: bo.xsd (right klick and save as ...)

Below you can see an example of an business object control file from the ice.NET tutorial Ice Car Rental.

<?xml version="1.0" encoding="utf-8" ?>
<BoBuild TargetDir=".">
    <Packages Dir="..\ModelXml">
        <Package Name="PDTec.ICR" Implement="true" ItfNamespace="PDTec.ICR.BusinessLogic.BusinessObjects" ImplNamespace="PDTec.ICR.BusinessLogic.BusinessObjects.Implementation" ItfTargetDir="." ImplTargetDir="Implementation" />
    </Packages>
    <Constants Namespace="PDTec.ICR.BusinessLogic.BusinessObjects">
        <Folders>
            <Folder Name="Data"                             Key="ICR.Data" />
            <Folder Name="Bookings"                         Key="ICR.Data.Bookings" />
            <Folder Name="Cars"                             Key="ICR.Data.Cars" />
            <Folder Name="Customers"                        Key="ICR.Data.Customers" />
        </Folders>
        <Objects>
        </Objects>
    </Constants>

    <Queries Namespace="PDTec.ICR.BusinessLogic.BusinessObjects.Queries">
        <Query Name="FindCustomers" Type="Find" ObjTypeName="PDTec.ICR.Customer" IsExactType="true" Range="Folder" CheckAuthorization="false">
            <Field Name="Id"                ItemType="Object" FieldType="Id" />
            <Field Name="Login"             ItemType="Object" FieldType="Name" />
            <Field Name="FirstName"
                         ItemType="Object"
                         FieldType="Attribute"
                         AttrDefName="FirstName"
                         AttrDefDeclTypeName = "PDTec.ICR.Customer"/>
            <Field Name="LastName"
                         ItemType="Object"
                         FieldType="Attribute"
                         AttrDefName= "LastName"
                         AttrDefDeclTypeName = "PDTec.ICR.Customer" />
            <Field Name="CompanyName"
                         ItemType="Object"
                         FieldType="Attribute"
                         AttrDefName= "CompanyName"
                         AttrDefDeclTypeName = "PDTec.ICR.Customer"  />
        </Query>
        <Query Name="FindBookedVehicles" Type="Find" ObjTypeName="PDTec.ICR.Vehicle" IsExactType="true" Range="Folder" CheckAuthorization="false">
            <Field Name="VehicleId" ItemType="Object" FieldType="Id" />
            <Field Name="RegisterNumber"
                   ItemType="Object"
                   FieldType="Attribute"
                   AttrDefName="RegisterNumber"
                   AttrDefDeclTypeName = "PDTec.ICR.Vehicle" />
            <Constraint Parameter0Name="fromDate" ItemType="Object"
               AddStepRelTypeName="PDTec.ICR.BookedVehicle"
               AddStepRelDirection="Reverse"
               FieldType="Attribute"
               AttrDefName="FromDate"
               AttrDefDeclTypeName="PDTec.ICR.Booking"  ConstraintType="Less" />

            <Constraint Parameter0Name="toDate" ItemType="Object"
              AddStepRelTypeName="PDTec.ICR.BookedVehicle"
              AddStepRelDirection="Reverse"
              FieldType="Attribute"
              AttrDefName="ToDate"
              AttrDefDeclTypeName="PDTec.ICR.Booking"  ConstraintType="Greater" />
        </Query>
        <Query Name="FindAllVehicles" Type="Find" ObjTypeName="PDTec.ICR.Vehicle" IsExactType="true" Range="Folder" CheckAuthorization="false">
            <Field Name="VehicleId" ItemType="Object" FieldType="Id" />
            <Field Name="RegisterNumber"
               ItemType="Object"
               FieldType="Attribute"
               AttrDefName="RegisterNumber"
               AttrDefDeclTypeName = "PDTec.ICR.Vehicle" />
            <Field Name="CurrentMileage"
               ItemType="Object"
               FieldType="Attribute"
               AttrDefName="CurrentMileage"
               AttrDefDeclTypeName = "PDTec.ICR.Vehicle" />
            <Field Name="ModelManufacturer"
               ItemType="Object"
               AddStepRelTypeName="PDTec.ICR.VehicleModel"
               AddStepRelDirection="Forward"
               FieldType="Attribute"
               AttrDefName="Manufacturer"
               AttrDefDeclTypeName="PDTec.ICR.Model" />
            <Field Name="ModelEnginePower"
               ItemType="Object"
               AddStepRelTypeName="PDTec.ICR.VehicleModel"
               AddStepRelDirection="Forward"
               FieldType="Attribute"
               AttrDefName="EnginePower"
               AttrDefDeclTypeName="PDTec.ICR.Model" />
        </Query>
        <Query Name="CustomerBookings" Type="Expand">
            <Step RelTypeName="PDTec.ICR.CustomerBookings" RelDirection="Forward" >
                <Field Name="FromDate"
                     ItemType="Object"
                     FieldType="Attribute"
                     AttrDefName="FromDate"
                     AttrDefDeclTypeName="PDTec.ICR.Booking" />
                <Field Name="ToDate"
                     ItemType="Object"
                     FieldType="Attribute"
                     AttrDefName="ToDate"
                     AttrDefDeclTypeName="PDTec.ICR.Booking" />
                <Field Name="Price"
                     ItemType="Object"
                     FieldType="Attribute"
                     AttrDefName="Price"
                     AttrDefDeclTypeName="PDTec.ICR.Booking" />
                <Field Name="PaymentReceived"
                       ItemType="Object"
                       FieldType="Attribute"
                       AttrDefName="PaymentReceived"
                       AttrDefDeclTypeName="PDTec.ICR.Booking" />
                <Field Name="BookingStatus"
                     ItemType="Object"
                     FieldType="Attribute"
                     AttrDefName="BookingStatus"
                     AttrDefDeclTypeName="PDTec.ICR.Booking" />
            </Step>
            <Step  RelTypeName="PDTec.ICR.BookedVehicle"  RelDirection="Forward">
                <Field Name="VehicleRegisterNumber"
                     ItemType="Object"
                     FieldType="Attribute"
                     AttrDefName="RegisterNumber"
                     AttrDefDeclTypeName = "PDTec.ICR.Vehicle" />
            </Step>
            <Step  RelTypeName="PDTec.ICR.VehicleModel"  RelDirection="Forward">
                <Field Name="VehicleModelName"  ItemType="Object" FieldType="Name" />
                <Field Name="VehicleModelProducer"
                     ItemType="Object"
                     FieldType="Attribute"
                     AttrDefName="Manufacturer"
                     AttrDefDeclTypeName = "PDTec.ICR.Model" />
            </Step>
        </Query>
    </Queries>
</BoBuild>