Package org.hibernate.ogm.util.impl

Examples of org.hibernate.ogm.util.impl.PropertyMetadataProvider


  private void doRemovePropertyMetadata(Cache<AssociationKey, List<Map<String,Object>>> associationCache,
                      int tableIndex,
                      int propertyIndex,
                      Object[] oldColumnValue) {
    PropertyMetadataProvider metadataProvider = new PropertyMetadataProvider()
            .associationCache( associationCache )
        .keyColumnNames( persister.getPropertyColumnNames( propertyIndex ) )
        .columnValues( oldColumnValue )
        .session( session )
        .tableName( persister.getTableName( tableIndex ) );
    Map<String,Object> idTuple = getTupleKey();
    List<Map<String,Object>> propertyValues = metadataProvider.getCollectionMetadata();
    if ( propertyValues != null ) {
      //Map's equals operation delegates to all it's key and value, should be fine for now
      final Map<String, Object> matchingTuple = metadataProvider.findMatchingTuple( idTuple );
      //TODO what should we do if that's null?
      if (matchingTuple != null) {
        metadataProvider.getCollectionMetadata().remove( matchingTuple );
      }
      metadataProvider.flushToCache();
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.util.impl.PropertyMetadataProvider

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.