Examples of CacheMode


Examples of br.net.woodstock.rockframework.domain.persistence.orm.CacheMode

  @Override
  protected void setQueryOption(final Query query, final String name, final Object value) {
    if (name.equals(Constants.OPTION_CACHE_MODE)) {
      if (value instanceof CacheMode) {
        CacheMode cacheMode = (CacheMode) value;
        if (cacheMode == CacheMode.ENABLED) {
          query.setCacheable(true);
          query.setCacheMode(org.hibernate.CacheMode.NORMAL);
        }
      } else if (value != null) {
View Full Code Here

Examples of br.net.woodstock.rockframework.persistence.orm.CacheMode

  @Override
  protected void setQueryOption(final Query query, final String name, final Object value) {
    if (name.equals(Constants.OPTION_CACHE_MODE)) {
      if (value instanceof CacheMode) {
        CacheMode cacheMode = (CacheMode) value;
        if (cacheMode == CacheMode.ENABLED) {
          query.setCacheable(true);
          query.setCacheMode(org.hibernate.CacheMode.NORMAL);
        }
      } else if (value != null) {
View Full Code Here

Examples of com.seaglasslookandfeel.painter.AbstractRegionPainter.PaintContext.CacheMode

            return;

        Object[] extendedCacheKeys = getExtendedCacheKeys(c);

        ctx = getPaintContext();
        CacheMode cacheMode = ctx == null ? CacheMode.NO_CACHING : ctx.getCacheMode();

        if (cacheMode == CacheMode.NO_CACHING || !ImageCache.getInstance().isImageCachable(w, h) || g instanceof PrinterGraphics) {
            paintDirectly(g, c, w, h, extendedCacheKeys);
        } else {
            paintWithCaching(g, c, w, h, extendedCacheKeys);
View Full Code Here

Examples of com.sleepycat.je.CacheMode

                        rootLatch.release();
                        rootLatchIsHeld = false;
                        continue;
                    }

                    final CacheMode cacheMode = cursor.getCacheMode();
                    final EnvironmentImpl env = database.getDbEnvironment();
                    final LogManager logManager = env.getLogManager();
                    final INList inMemoryINs = env.getInMemoryINs();

                    /*
 
View Full Code Here

Examples of com.sleepycat.je.CacheMode

        if (strategy == null) {
            throw new IllegalStateException
                ("CacheMode.DYNAMIC may not be used without also configuring" +
                 " a CacheModeStrategy for the Database or Environment.");
        }
        final CacheMode dynamicMode = strategy.getCacheMode();
        if (dynamicMode == null || dynamicMode == CacheMode.DYNAMIC) {
            throw new IllegalArgumentException
                ("" + dynamicMode + " was illegally returned by " +
                 strategy.getClass().getName());
        }
View Full Code Here

Examples of org.hibernate.CacheMode

      EntityPersister persister,
      Object entity,
      EntityEntry entityEntry,
      Set transientEntities) throws HibernateException {

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to collections BEFORE the collection owner is deleted
      new Cascade( CascadingAction.DELETE, Cascade.AFTER_INSERT_BEFORE_DELETE, session )
View Full Code Here

Examples of org.hibernate.CacheMode

      EventSource session,
      EntityPersister persister,
      Object entity,
      Set transientEntities) throws HibernateException {

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to many-to-one AFTER the parent was deleted
      new Cascade( CascadingAction.DELETE, Cascade.BEFORE_INSERT_AFTER_DELETE, session )
View Full Code Here

Examples of org.hibernate.CacheMode

  @Override
  public <A> A find(Class<A> entityClass, Object primaryKey, LockModeType lockModeType, Map<String, Object> properties) {
    checkOpen();
    Session session = internalGetSession();
    CacheMode previousCacheMode = session.getCacheMode();
    CacheMode cacheMode = determineAppropriateLocalCacheMode( properties );
    LockOptions lockOptions = null;
    try {
      session.setCacheMode( cacheMode );
      if ( lockModeType != null ) {
        lockOptions = getLockRequest( lockModeType, properties );
View Full Code Here

Examples of org.hibernate.CacheMode

  public void refresh(Object entity, LockModeType lockModeType, Map<String, Object> properties) {
    checkOpen();
    checkTransactionNeeded();

    Session session = internalGetSession();
    CacheMode previousCacheMode = session.getCacheMode();
    CacheMode localCacheMode = determineAppropriateLocalCacheMode( properties );
    LockOptions lockOptions = null;
    try {
      session.setCacheMode( localCacheMode );
      if ( !session.contains( entity ) ) {
        throw new IllegalArgumentException( "Entity not managed" );
View Full Code Here

Examples of org.hibernate.CacheMode

      EntityPersister persister,
      Object entity,
      EntityEntry entityEntry,
      Set transientEntities) throws HibernateException {

    CacheMode cacheMode = session.getCacheMode();
    session.setCacheMode( CacheMode.GET );
    session.getPersistenceContext().incrementCascadeLevel();
    try {
      // cascade-delete to collections BEFORE the collection owner is deleted
      new Cascade( CascadingActions.DELETE, CascadePoint.AFTER_INSERT_BEFORE_DELETE, session ).cascade(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.