Package org.hibernate.ogm.grid

Examples of org.hibernate.ogm.grid.RowKey


        //otherwise read it from the database structure
        if ( getFromMongoData == true ) {
          columnValues.add( mongodbColumnData.get( columnKey ) );
        }
      }
      RowKey rowKey = new RowKey(
          key.getTable(),
          columnNames.toArray( new String[columnNames.size()] ),
          columnValues.toArray() );
      //Stock database structure per RowKey
      this.map.put( rowKey, row );
View Full Code Here


    @Override
    public Tuple next() {
      DBObject dbObject = cursor.next();

      RowKey rowKey = new RowKey(
          keyMetaData.getTable(),
          keyMetaData.getColumnNames(),
          new Object[] { dbObject.get( MongoDBDialect.ID_FIELDNAME ) }
          );
View Full Code Here

    else {
      for (int index = 0 ; index < length ; index++ ) {
        columnValuesArray[index] = tuple.get( columnNamesArray[index] );
      }
    }
    return new RowKey( tableName, columnNamesArray, columnValuesArray );
  }
View Full Code Here

  @Override
  public Set<RowKey> getRowKeys() {
    Set<RowKey> rowKeys = new HashSet<RowKey>( associationMap.size() );

    for ( SerializableKey key : associationMap.keySet() ) {
      rowKeys.add( new RowKey( key.getTable(), key.getColumnNames(), key.getColumnValues() ) );
    }

    return rowKeys;
  }
View Full Code Here

              propertyColumnNames,
              includeColumns[propertyIndex],
              session
          );
    Object[] columnValues = LogicalPhysicalConverterHelper.getColumnValuesFromResultset( tuple, rowKeyColumnNames );
    final RowKey rowKey = new RowKey( persister.getTableName(), rowKeyColumnNames, columnValues );

    Tuple assocEntryTuple = metadataProvider.createAndPutAssociationTuple( rowKey );
    for ( String column : tuple.getColumnNames() ) {
      assocEntryTuple.put( column, tuple.get( column ) );
    }
View Full Code Here

    Association propertyValues = metadataProvider.getCollectionMetadata();
    if ( propertyValues != null ) {
      //Map's equals operation delegates to all it's key and value, should be fine for now
      //this is a StarToOne case ie the FK is on the owning entity
      final RowKey matchingTuple = new RowKeyBuilder()
          .tableName( persister.getTableName() )
          .addColumns( buildRowKeyColumnNamesForStarToOne( persister, propertyColumnNames ) )
          .values( tupleKey )
          .build();
      //TODO what should we do if that's null?
View Full Code Here

  public IntegralDataTypeHolder doWorkInCurrentTransactionIfAny(SessionImplementor session) {
    defineGridTypes( session );
    final Object segmentColumnValue = nullSafeSet(
        segmentGridType, segmentValue, segmentColumnName, session
    );
    RowKey key = new RowKey(
        tableName,
        new String[] { segmentColumnName },
        new Object[] { segmentColumnValue }
    );
View Full Code Here

    while ( entries.hasNext() ) {
      Object entry = entries.next();
      if ( collection.needsUpdating( entry, i, elementType ) ) {
        // find the matching element
        RowKey assocEntryKey = getTupleKeyForUpdate( key, collection, session, i, entry );
        Tuple assocEntryTuple = metadataProvider.getCollectionMetadata().get( assocEntryKey );
        if ( assocEntryTuple == null ) {
          throw new AssertionFailure( "Updating a collection tuple that is not present: " + "table {" + getTableName() + "} collectionKey {" + key + "} entry {" + entry + "}" );
        }
        // update the matching element
View Full Code Here

      if ( deletes.hasNext() ) {
        int count = 0;
        while ( deletes.hasNext() ) {
          Object entry = deletes.next();
          // find the matching element
          RowKey assocEntryKey = getTupleKeyForDelete( id, collection, session, entry, deleteByIndex );
          Tuple assocEntryTuple = metadataProvider.getCollectionMetadata().get( assocEntryKey );
          if ( assocEntryTuple == null ) {
            throw new AssertionFailure( "Deleting a collection tuple that is not present: " + "table {" + getTableName() + "} collectionKey {" + id + "} entry {" + entry + "}" );
          }
          // delete the tuple
View Full Code Here

      query = assocSnapshot.getQueryObject();
      associationField = ROWS_FIELDNAME;
    }

    for ( AssociationOperation action : association.getOperations() ) {
      RowKey rowKey = action.getKey();
      Tuple rowValue = action.getValue();

      DBObject update = null;

      switch ( action.getType() ) {
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.grid.RowKey

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.