Codota Logo
IEntityConverterFields.getHistoryAction
Code IndexAdd Codota to your IDE (free)

How to use
getHistoryAction
method
in
uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields

Best Java code snippets using uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields.getHistoryAction (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: dstl/baleen

private Map<String, Object> createEventMap(HistoryEvent historyEvent) {
 Map<String, Object> linkedHistoryMap = new IgnoreEmptyKeyMapDecorator<>(new LinkedHashMap<>());
 if (historyEvent.getRecordable().getInternalId() != entityInternalId) {
  // Only save the internal id as a reference to entities which aren't this one.
  linkedHistoryMap.put(
    fields.getHistoryRecordable(), historyEvent.getRecordable().getInternalId());
 }
 linkedHistoryMap.put(fields.getHistoryAction(), historyEvent.getAction());
 linkedHistoryMap.put(fields.getHistoryType(), historyEvent.getEventType());
 linkedHistoryMap.put(fields.getHistoryParameters(), historyEvent.getParameters());
 linkedHistoryMap.put(fields.getHistoryReferrer(), historyEvent.getReferrer());
 linkedHistoryMap.put(fields.getHistoryTimestamp(), historyEvent.getTimestamp());
 return linkedHistoryMap;
}
origin: dstl/baleen

@Test
public void testHistoryEventIsConvertedToMap() {
 Map<String, Object> nonMergedHistoryMap = (Map<String, Object>) historyList.get(0);
 Map<String, String> nonMergedHistoryParameters =
   (Map<String, String>) nonMergedHistoryMap.get(fields.getHistoryParameters());
 assertEquals(
   "Linked history map should have an action",
   ACTION,
   nonMergedHistoryMap.get(fields.getHistoryAction()));
 assertEquals(
   "Linked history map should have an event type",
   EVENT_TYPE,
   nonMergedHistoryMap.get(fields.getHistoryType()));
 assertEquals(
   "History parameters should have kwy1-value1",
   "value1",
   nonMergedHistoryParameters.get("key1"));
 assertEquals(
   "Linked history map should have referrer",
   REFERRER,
   nonMergedHistoryMap.get(fields.getHistoryReferrer()));
 assertEquals(
   "Linked history map should have timestamp",
   currentTimeMillis,
   nonMergedHistoryMap.get(fields.getHistoryTimestamp()));
}
uk.gov.dstl.baleen.consumers.utilsIEntityConverterFieldsgetHistoryAction

Popular methods of IEntityConverterFields

  • getExternalId
  • getHistory
  • getHistoryParameters
  • getHistoryReferrer
  • getHistoryTimestamp
  • getHistoryType
  • getType
  • getGeoJSON
  • getHistoryRecordable

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now