private IEntityLock instanceFromResultSet ( java . sql . ResultSet rs ) throws SQLException , LockingException { Integer entityTypeID = rs . getInt ( 1 ) ; Class entityType = EntityTypesLocator . getEntityTypes ( ) . getEntityTypeFromID ( entityTypeID ) ; String key = rs . getString ( 2 ) ; int lockType = rs . getInt ( 3 ) ; Timestamp ts = rs . getTimestamp ( 4 ) ; String lockOwner = rs . getString ( 5 ) ; return newInstance ( entityType , key , lockType , ts , lockOwner ) ; }
Extract values from ResultSet and create a new lock .