Use the generated static methods in the MBO classes to retrieve MBO instances.
- To find all instances of an MBO, invoke the static findAll method contained in that MBO. For example, an MBO
named Customer contains a method such as public static
Sybase.Collections.GenericList<MBO> FindAll().
- To find a particular instance of an MBO using the primary key,
invoke MBO.FindByPrimaryKey(...). For example, if a Customer has the primary
key "id" as int, the Customer MBO would contain the public static Customer FindByPrimaryKey(int
id) method, which performs the
equivalent of Select x.* from Customer x where x.id = :id.
If the return type is a list, additional methods are generated for you to
further process the result, for example, to use paging. For example, consider this
method, which returns a list of MBOs containing the specified city name: Sybase.Collections.GenericList<SUP101.Customer> FindByCity(string city, int
skip, int take);. The skip parameter
specifies the number of rows to skip, and the take
parameter specifies the maximum number of rows to return.