Skip to content

Instantly share code, notes, and snippets.

@FNogger
Last active January 31, 2018 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FNogger/2e1b6d1602831a7c924dd1778ed5fbe3 to your computer and use it in GitHub Desktop.
Save FNogger/2e1b6d1602831a7c924dd1778ed5fbe3 to your computer and use it in GitHub Desktop.
Find
/// <summary>
/// Finds the specified record in the <c>CarTable</c> table.
/// </summary>
/// <param name="_carId">
/// The CarId of the <c>CarTable</c> record to find.
/// </param>
/// <param name="_forupdate">
/// A Boolean value that indicates whether to read the record for update; optional.
/// </param>
/// <param name="_concurrencyModel">
/// The table selection ConcurrencyModel; optional.
/// </param>
/// <returns>
/// A record in the <c>CarTable</c> table; otherwise, an empty record.
/// </returns>
// Begin : Axaptahut, DevTools
public static CarTable find(AccountNum _carId, boolean _forupdate = false,
ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
{
CarTable carTable;
carTable.selectForUpdate(_forupdate);
if (_forupdate && _concurrencyModel != ConcurrencyModel::Auto)
{
carTable.concurrencyModel(_concurrencyModel);
}
select firstonly carTable
where carTable.CarId == _carId;
return carTable;
}
// End: Axaptahut, DevTools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment