...
Business objects are java classes that implement the org.kuali.ricekfs.kns.bo.BusinessObject
interface. However, a majority of business objects extend org.kuali.ricekfs.kns.bo.PersistableBusinessObjectBase
, which implements org.kuali.ricekfs.kns.bo.PersistableBusinessObject
and org.kuali.ricekfs.kns.bo.BusinessObject
.
Tip |
---|
BOs extending org.kuali.ricekfs.kns.bo.PersistableBusinessObjectBase inherit getters and setters for the object ID and version number columns, so there is no need to implement them in subclasses. |
...
Objects that extend org.kuali.ricekfs.kns.bo.BusinessObjectBase
must also implement the toStringMapper
method, which returns a map of the BO's fields to be used in toString
.
Tip |
---|
The reader should consult the org.kuali.ricekfs.kns.bo.PersistableBusinessObject interface to determine whether there are additional methods that should be implemented/overridden. The interface defines numerous methods that customize the behavior of the business object upon persistence and retrieval of the business object, and how reference objects of the business object are refreshed, as well as other methods. |
...
Code Block |
---|
|
package org.kuali.kfs.coa.dataaccess.jdbc;
import org.kuali.kfs.coa.dataaccess.AccountDao;
import org.kuali.ricekfs.kns.dao.jdbc.PlatformAwareDaoBaseJdbc;
public class AccountDaoJdbc extends PlatformAwareDaoBaseJdbc implements AccountDao{
public void updateAllAccountFiscalOfficers(String userId} {
getSimpleJdbcTemplate().update("update CA_ACCOUNT_T set ACCT_FSC_OFC_UID = ?", userId);
}
}
|
...
Note |
---|
title | Transactional Services |
---|
|
Service implementations that use Iterator 's and other data structures that are lazily loaded from the underlying data store should be annotated with @Transactional . @Transactional d escribes transaction attributes on a method or a class.The first method from a class annotated @Transactional in the call stack will start a transaction. When that method terminates (ends, returns, or throws exception), then the transaction will be committed or rolled back. If a transactional method directly or indirectly invokes another transactional method, only one transaction is started. There are ways to start a second transaction, consult the @Transactional javadocs for more details. Also you may be able to locate a @NonTransactional which is just a markdermarker, this annotation has no effect in the application at runtime. It is only used by unit tests which seek to enforce/confirm that the transactional policy is being applied. Please read javadocs for additional details. |
...