Standard Business Methods
In general, classes that are created to implement business logic, including change handlers, business entities, maintenance classes, and business components have access to standard methods intended to give application code access to framework functionality. Commonly, these classes extend the GenericBusinessObject class within their inheritance hierarchy. Below are some general descriptions of the provided methods. Please refer to the JavaDocs for more detail.
createQuery(String)-Create an HQL query.
createPreparedStatement(String)-Create a "raw" SQL statement. It is preferable to use the createQuery method.
getActiveContextLanguage()/getActiveContextUser()-Get the language and user associated with the current request.
createDTO(Class)-Create a new DataTransferObject instance for the entity corresponding to the provided business interface class.
getDynamicComponent(various)-Get a Business Component instance corresponding to the input business interface for the component.
getSystemDateTime()-Get the current DateTime instance appropriate for business logic.
IsNull(Object)/notNull(Object)-Methods that answer the question if an object is null or is equivalent to null.
isNullOrBlank(String)/notBlank(String)-Methods that answer the question if a String reference is null, zero length, or all blank.
startChanges()/saveChanges()-Used to defer validation when making complex changes to entities. It may be the case where a valid entity can only be constructed by passing through one or more invalid states. By calling startChanges() at the beginning of the set of changes and saveChanges() at the end, some validations may be deferred until the entire coherent change is complete.