private void saveConnectionRecord ( ActiveConnectionRecord record ) { // Get associated models ConnectionRecordModel recordModel = new ConnectionRecordModel ( ) ; // Copy user information and timestamps into new record recordModel . setUsername ( record . getUsername ( ) ) ; recordModel . setConnectionIdentifier ( record . getConnectionIdentifier ( ) ) ; recordModel . setConnectionName ( record . getConnectionName ( ) ) ; recordModel . setRemoteHost ( record . getRemoteHost ( ) ) ; recordModel . setSharingProfileIdentifier ( record . getSharingProfileIdentifier ( ) ) ; recordModel . setSharingProfileName ( record . getSharingProfileName ( ) ) ; recordModel . setStartDate ( record . getStartDate ( ) ) ; recordModel . setEndDate ( new Date ( ) ) ; // Insert connection record connectionRecordMapper . insert ( recordModel ) ; }
Saves the given ActiveConnectionRecord to the database . The end date of the saved record will be populated with the current time .