Codota Logo
IntactFlushMode
Code IndexAdd Codota to your IDE (free)

How to use
IntactFlushMode
in
uk.ac.ebi.intact.core.annotations

Best Java code snippets using uk.ac.ebi.intact.core.annotations.IntactFlushMode (Showing top 13 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: uk.ac.ebi.intact.dataexchange/intact-cvutils

/**
 * Starts the creation and update of CVs by using the ontology provided
 *
 * @param allCvs List of all Cvs
 * @return An object containing some statistics about the update
 */
@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public CvUpdaterStatistics createOrUpdateCVs( List<CvDagObject> allCvs ) {
  return createOrUpdateCVs( allCvs, new AnnotationInfoDataset() );
}
origin: uk.ac.ebi.intact.core/intact-core

@Around("@annotation(intactFlushMode)")
public Object switchFlushMode(ProceedingJoinPoint pjp, IntactFlushMode intactFlushMode) throws Throwable{
  FlushModeType flushMode = entityManager.getFlushMode();
  FlushModeType newFlushMode = intactFlushMode.value();
  boolean switchedMode = newFlushMode != flushMode;
  if (switchedMode) {
    if (log.isDebugEnabled()) log.debug("Setting flush mode to: "+ newFlushMode);
    entityManager.setFlushMode(newFlushMode);
  }
  Object obj = null;
  try {
    obj = pjp.proceed();
  } finally {
    if (switchedMode) {
      if (log.isDebugEnabled()) log.debug("Resetting back flush mode to: " + flushMode);
      entityManager.setFlushMode(flushMode);
    }
  }
  return obj;
}
origin: uk.ac.ebi.intact.dataexchange/intact-cvutils

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public CvUpdaterStatistics executeUpdate(OBOSession oboSession) throws IOException{
   return executeUpdate(oboSession, new AnnotationInfoDataset());
 }
origin: uk.ac.ebi.intact.core/intact-core-readonly

@Around("@annotation(intactFlushMode)")
public Object switchFlushMode(ProceedingJoinPoint pjp, IntactFlushMode intactFlushMode) throws Throwable{
  FlushModeType flushMode = entityManager.getFlushMode();
  FlushModeType newFlushMode = intactFlushMode.value();
  boolean switchedMode = newFlushMode != flushMode;
  if (switchedMode) {
    if (log.isDebugEnabled()) log.debug("Setting flush mode to: "+ newFlushMode);
    entityManager.setFlushMode(newFlushMode);
  }
  Object obj = null;
  try {
    obj = pjp.proceed();
  } finally {
    if (switchedMode) {
      if (log.isDebugEnabled()) log.debug("Resetting back flush mode to: " + flushMode);
      entityManager.setFlushMode(flushMode);
    }
  }
  return obj;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public PersisterStatistics saveOrUpdate( AnnotatedObject... annotatedObjects ) throws PersisterException {
  for (AnnotatedObject ao : annotatedObjects) {
    if (log.isDebugEnabled()) log.debug("Saving: "+DebugUtil.annotatedObjectToString(ao, false));
    synchronize(ao);
  }
  commit();
  // we reload the annotated objects by its AC
  // note: if an object does not have one, it is probably a duplicate
  for ( AnnotatedObject ao : annotatedObjects ) {
    reload( ao );
  }
  if (log.isDebugEnabled()) log.debug(statistics);
  return statistics;
}
origin: uk.ac.ebi.intact.dataexchange/intact-cvutils

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public CvUpdaterStatistics executeUpdate(OBOSession oboSession, AnnotationInfoDataset annotationInfoDataset) throws IOException{
   CvObjectOntologyBuilder builder = new CvObjectOntologyBuilder(oboSession);
   return createOrUpdateCVs(builder.getAllCvs(), annotationInfoDataset);
}
origin: uk.ac.ebi.intact.core/intact-core

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public PersisterStatistics saveOrUpdate( AnnotatedObject... annotatedObjects ) throws PersisterException {
  for (AnnotatedObject ao : annotatedObjects) {
    if (log.isDebugEnabled()) log.debug("Saving: "+DebugUtil.annotatedObjectToString(ao, false));
    synchronize(ao);
  }
  commit();
  // we reload the annotated objects by its AC
  // note: if an object does not have one, it is probably a duplicate
  for ( AnnotatedObject ao : annotatedObjects ) {
    reload( ao );
  }
  if (log.isDebugEnabled()) log.debug(statistics);
  return statistics;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
@Deprecated
public PersisterStatistics save( AnnotatedObject... annotatedObjects ) throws PersisterException {
  CorePersister corePersister = getCorePersister();
  corePersister.getStatistics().reset();
  corePersister.saveOrUpdate(annotatedObjects);
  return corePersister.getStatistics();
}
origin: uk.ac.ebi.intact.dataexchange/intact-cvutils

 /**
 * Starts the creation and update of CVs by using the latest available CVs from internet
 *
 * @return An object containing some statistics about the update
 */
@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public CvUpdaterStatistics executeUpdateWithLatestCVs() throws IOException{
   OBOSession oboSession = null;
   try {
     oboSession = OboUtils.createOBOSessionFromLatestMi();
   } catch (OBOParseException e) {
     throw new IOException("Problem creating OBO session from latest MI: "+e.getMessage());
   }
   AnnotationInfoDataset annotationInfoDataset = OboUtils.createAnnotationInfoDatasetFromLatestResource();
   return executeUpdate(oboSession, annotationInfoDataset);
 }
origin: uk.ac.ebi.intact.core/intact-core

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
@Deprecated
public PersisterStatistics save( AnnotatedObject... annotatedObjects ) throws PersisterException {
  CorePersister corePersister = getCorePersister();
  corePersister.getStatistics().reset();
  corePersister.saveOrUpdate(annotatedObjects);
  return corePersister.getStatistics();
}
origin: uk.ac.ebi.intact.dataexchange/intact-cvutils

@IntactFlushMode(FlushModeType.COMMIT)
public CvUpdaterStatistics createOrUpdateCVs( List<CvDagObject> allValidCvs, AnnotationInfoDataset annotationInfoDataset ) {
origin: uk.ac.ebi.intact.core/intact-core-readonly

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public void saveOrUpdate( User... users ) {
  for ( User user : users ) {
origin: uk.ac.ebi.intact.core/intact-core

@Transactional
@IntactFlushMode(FlushModeType.COMMIT)
public void saveOrUpdate( User... users ) {
  for ( User user : users ) {
uk.ac.ebi.intact.core.annotationsIntactFlushMode

Most used methods

  • <init>
  • value

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getExternalFilesDir (Context)
  • String (java.lang)
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Path (java.nio.file)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
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