Package org.hibernate.ogm.datastore.ehcache.dialect.impl

Examples of org.hibernate.ogm.datastore.ehcache.dialect.impl.SerializableEntityKey


  }

  @Override
  public Tuple getTuple(EntityKey key, TupleContext tupleContext) {
    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    final Element element = entityCache.get( new SerializableEntityKey( key ) );
    if ( element != null ) {
      return createTuple( element );
    }
    else {
      return null;
View Full Code Here


  @Override
  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    final HashMap<String, Object> tuple = new HashMap<String, Object>();
    entityCache.put( new Element( new SerializableEntityKey( key ), tuple ) );

    return new Tuple( new MapTupleSnapshot( tuple ) );
  }
View Full Code Here

  public void insertOrUpdateTuple(EntityKey key, Tuple tuple, TupleContext tupleContext) {
    Map<String, Object> entityRecord = ( (MapTupleSnapshot) tuple.getSnapshot() ).getMap();
    MapHelpers.applyTupleOpsOnMap( tuple, entityRecord );

    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    entityCache.put( new Element( new SerializableEntityKey( key ), entityRecord ) );
  }
View Full Code Here

    entityCache.put( new Element( new SerializableEntityKey( key ), entityRecord ) );
  }

  @Override
  public void removeTuple(EntityKey key, TupleContext tupleContext) {
    datastoreProvider.getEntityCache().remove( new SerializableEntityKey( key ) );
  }
View Full Code Here

  @Override
  public Map<String,Object> extractEntityTuple(SessionFactory sessionFactory, EntityKey key) {
    @SuppressWarnings("unchecked")
    Map<String, Object> tuple = (Map<String, Object>) getProvider( sessionFactory )
        .getEntityCache()
        .get( new SerializableEntityKey( key ) )
        .getObjectValue();

    return tuple;
  }
View Full Code Here

  }

  @Override
  public Tuple getTuple(EntityKey key, TupleContext tupleContext) {
    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    final Element element = entityCache.get( new SerializableEntityKey( key ) );
    if ( element != null ) {
      return createTuple( element );
    }
    else {
      return null;
View Full Code Here

  @Override
  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    final HashMap<String, Object> tuple = new HashMap<String, Object>();
    entityCache.put( new Element( new SerializableEntityKey( key ), tuple ) );

    return new Tuple( new MapTupleSnapshot( tuple ) );
  }
View Full Code Here

  public void insertOrUpdateTuple(EntityKey key, Tuple tuple, TupleContext tupleContext) {
    Map<String, Object> entityRecord = ( (MapTupleSnapshot) tuple.getSnapshot() ).getMap();
    MapHelpers.applyTupleOpsOnMap( tuple, entityRecord );

    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    entityCache.put( new Element( new SerializableEntityKey( key ), entityRecord ) );
  }
View Full Code Here

    entityCache.put( new Element( new SerializableEntityKey( key ), entityRecord ) );
  }

  @Override
  public void removeTuple(EntityKey key, TupleContext tupleContext) {
    datastoreProvider.getEntityCache().remove( new SerializableEntityKey( key ) );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.datastore.ehcache.dialect.impl.SerializableEntityKey

Copyright © 2018 www.massapicom. 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.