Заполните envers таблицы пересмотра с существующими данными из, в спящем режиме Объекты

Для золотой середины между 2 32 глоток> таблица поиска и выполняющий итерации через каждый бит индивидуально:

int bitcount(unsigned int num){
    int count = 0;
    static int nibblebits[] =
        {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
    for(; num != 0; num >>= 4)
        count += nibblebits[num & 0x0f];
    return count;
}

От http://ctips.pbwiki.com/CountBits

21
задан skaffman 15 March 2011 в 11:16
поделиться

1 ответ

Take a look at http://www.jboss.org/files/envers/docs/index.html#revisionlog

Basically you can define your own 'revision type' using @RevisionEntity annotation, and then implement a RevisionListener interface to insert your additional audit data, like current user and high level operation. Usually those are pulled from ThreadLocal context.

1
ответ дан 29 November 2019 в 21:32
поделиться
Другие вопросы по тегам:

Похожие вопросы: