Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleWersja pliku, a dokument

W systemie PlusWorkflow wersjonowane są wyłącznie pliki, a nie dokumenty. Plik zawsze posiada wersję, natomiast dokument odnosi się do najnowszej wersji pliku z którym jest powiązany.

Przydatne klasy: 

...

Do wyszukiwania dokumentów należy używać klasy DocumentFinder

Code Block
languagejava
titlePodstawowe wyszukiwanie dokumentów
linenumberstrue
		DocumentFinder documentFinder=FinderFactory.getDocumentFinder();		
 
		Map<Long, Object> idx = new HashMap<Long, Object>();
        idx.put( 1L, "wartość tekstowa" );
        idx.put( 2L, 555 );
        idx.put( 3L, new Date() );//wartości indeksów po których chcemy wyszukiwać
        List<Sorter> sorters=new ArrayList<Sorter>();
        sorters.add( new Sorter("3",SortDirection.DESC) );//sorujemy malejąco po indeksie o id 3
        CountedResult<WfDocument> result=documentFinder.findByIndexes( idx, sorters, documentClassId, start, limit );
        long total=result.getTotal();//liczba wszystkich pasujących dokumentów
        List<WfDocument> documents=result.getData();//lista znalezionych dokumentów ograniczona przez start i limit

...