find()
- find () returns a record from the table.
- find () must be used when a record is selected from the database by using the primary key of the table.
- find () method must be static because find () is used to find a record among all the records of the table.
- find () must be named find () and declared public as a best practise.
- Find () have parameters of data type of key of the table or list of parameters if the key consists of more than one field. And the parameters in find () must follow the same order that the index follows. Because inside index the fields are listed in some order.
- find () must have the Boolean parameter with default value False. If the Boolean parameter is true then the record is selected for update.
- Use very effective select operation to retrieve and return the record from table. You must use a proper index and firstonly keyword.
- Default behaviour to run is run on client and server. Never specify a single tier in the declaration, always use client server.
public static CustInterestJour find (interestNote _ interestNote, boolean
_forupdate = false)
{
select custInterestJour
index
hint InterestIdx
where custInterestJour.InterestNote ==
interestNote;
}
No comments:
Post a Comment