docs: private IEntityLock[] select(
              Class entityType, String entityKey, Integer lockType, Date expiration, String lockOwner)
              throws LockingException {
          StringBuffer sqlQuery = new StringBuffer(getSelectSql() + " WHERE 1 = 1");
  
          if (entityType != null) {
              Integer typeID = EntityTypesLocator.getEntityTypes().getEntityIDFromType(entityType);
              sqlQuery.append(" AND " + ENTITY_TYPE_COLUMN + EQ + typeID);
          }
  
          if (entityKey != null) {
              sqlQuery.append(" AND " + ENTITY_KEY_COLUMN + EQ + sqlQuote(entityKey));
          }
  
          if (lockType != null) {
              sqlQuery.append(" AND " + LOCK_TYPE_COLUMN + EQ + lockType);
          }
  
          if (expiration != null) {
              Timestamp ts = new Timestamp(expiration.getTime());
              sqlQuery.append(" AND " + EXPIRATION_TIME_COLUMN + EQ + printTimestamp(ts));
          }
  
          if (lockOwner != null) {
              sqlQuery.append(" AND " + LOCK_OWNER_COLUMN + EQ + sqlQuote(lockOwner));
          }
  
          return primSelect(sqlQuery.toString());
      }