Note: This page uses Javascript. You are seeing this note because your browser either doesn't support Javascript or Javascript is turned off. To view this help system as it is meant to be viewed please use a Javascript enabled browser.

TimeStamps

Previous TopicNext TopicContents

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...

}



Legal Notices
Copyright © 2003, 2013, Oracle and/or its affiliates. All rights reserved.

Last Published Wednesday, March 20, 2013