Package org.hibernate.ogm.persister

Examples of org.hibernate.ogm.persister.EntityKeyBuilder


  @Override
  public void lock(Serializable id, Object version, Object object, int timeout, SessionImplementor session)
      throws StaleObjectStateException, JDBCException {
    AdvancedCache advCache = GridMetadataManagerHelper.getEntityCache( session.getFactory() ).getAdvancedCache();
    advCache.lock( new EntityKeyBuilder()
        .tableName( lockable.getRootTableName() )
        .id( id )
        .getKey()
    );
    //FIXME check the version number as well and raise an optimistic lock exception if there is an issue JPA 2 spec: 3.4.4.2
View Full Code Here


  private TupleAsMapResultSet getResultSet(Serializable id, SessionImplementor session) {
    //TODO this if won't work when we will support collections inside the entity tuple but that will do for now
    final TupleAsMapResultSet resultset = new TupleAsMapResultSet();
    if ( getEntityPersisters().length > 0 ) {
      final Cache<EntityKey, Map<String, Object>> entityCache = GridMetadataManagerHelper.getEntityCache( gridManager );
      final EntityKey key = new EntityKeyBuilder()
          .entityPersister( getEntityPersisters()[0] )
          .id( id )
          .getKey();
      final Map<String,Object> entry = gridManager.getGridDialect().getTuple( key, entityCache );
      if ( entry != null ) {
View Full Code Here

    //TODO this if won't work when we will support collections inside the entity tuple but that will do for now
    final TupleAsMapResultSet resultset = new TupleAsMapResultSet();
    if ( getEntityPersisters().length > 0 ) {
      final Cache<EntityKey, Map<String, Object>> entityCache = GridMetadataManagerHelper.getEntityCache( gridManager );
      final Map<String,Object> entry = entityCache.get(
          new EntityKeyBuilder()
              .entityPersister( getEntityPersisters()[0] )
              .id( id )
              .getKey()
      );
      if ( entry != null ) {
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.persister.EntityKeyBuilder

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.