code: public CmsLock getLock(CmsDbContext dbc, CmsResource resource) throws CmsException {
  
          return getLock(dbc, resource, true);
      }
docs: Returns the lock state of the given resource.<p>
  
  In case no lock is set, the <code>null lock</code> which can be obtained
  by {@link CmsLock#getNullLock()} is returned.<p>
  
  @param dbc the current database context
  @param resource the resource
  
  @return the lock state of the given resource
  
  @throws CmsException if something goes wrong