TimeStamps

Each business object now provides information about the user (getCreateUser()) and the date (getCreateDate()) when the business object was created. Similarly, the getLastUpdateUser() and getLastUpdateDate() return the user who updated the business object and the date it was updated respectively. The getCreateUser() and getLastUpdateUser() only return the name of the user. If the User object is needed, it will need to be loaded separately.

Example: Load all users that have been updated after June 30, 2005 at 6:00 AM. The results are ordered by the update date:

java.util.Calendar calendar = new java.util.GregorianCalendar();

// 2005-6-30 06:00AM

calendar.set( 2005, 5, 30, 6, 0, 0);

java.util.Date testDate = new java.util.Date( calendar.getTimeInMillis() );

String wc = WhereClauseHelper.formatDate( session, testDate );

BOIterator<User> boi = elm.loadUsers( User.getAllFields(), "LastUpdateDate > " + wc, "LastUpdateDate asc" );

while ( boi.hasNext() )

{

User user = boi.next();
// Process user here...

}



Last Published Friday, February 2, 2024