@Override public EntityDefinition toEntityDefinition() { if ( !getType().isEntityType() ) { throw new IllegalStateException( "Cannot treat collection index type as entity" ); } return (EntityPersister) ( (AssociationType) getIndexType() ).getAssociatedJoinable( getFactory() ); }
sqle, "could not retrieve collection size: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
sqle, "could not check row existence: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
sqle, "could not read row: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not delete collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLDeleteString() );
public int getSize(Serializable key, SessionImplementor session) { try { PreparedStatement st = session.getTransactionCoordinator() .getJdbcCoordinator() .getStatementPreparer() .prepareStatement( sqlSelectSizeString ); try { getKeyType().nullSafeSet( st, key, 1, session ); ResultSet rs = st.executeQuery(); try { return rs.next() ? rs.getInt( 1 ) - baseIndex : 0; } finally { rs.close(); } } finally { st.close(); } } catch ( SQLException sqle ) { throw getFactory().getSQLExceptionHelper().convert( sqle, "could not retrieve collection size: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString ); } }
public int getSize(Serializable key, SessionImplementor session) { try { PreparedStatement st = session.getTransactionCoordinator() .getJdbcCoordinator() .getStatementPreparer() .prepareStatement( sqlSelectSizeString ); try { getKeyType().nullSafeSet( st, key, 1, session ); ResultSet rs = st.executeQuery(); try { return rs.next() ? rs.getInt( 1 ) - baseIndex : 0; } finally { rs.close(); } } finally { st.close(); } } catch ( SQLException sqle ) { throw getFactory().getSQLExceptionHelper().convert( sqle, "could not retrieve collection size: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString ); } }
throw getFactory().getSQLExceptionHelper().convert( sqle, "could not check row existence: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
throw getFactory().getSQLExceptionHelper().convert( sqle, "could not check row existence: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
sqle, "could not insert collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLInsertRowString() );
throw getFactory().getSQLExceptionHelper().convert( sqle, "could not read row: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
throw getFactory().getSQLExceptionHelper().convert( sqle, "could not read row: " + MessageHelper.collectionInfoString( this, key, getFactory() ), sqlSelectSizeString );
log.debug( "Deleting collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not delete collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLDeleteString() );
log.debug( "Deleting rows of collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not delete collection rows: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLDeleteRowString() );
log.debug( "Inserting collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not insert collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLInsertRowString() );
log.debug( "Inserting rows of collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not insert collection rows: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLInsertRowString() );
MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not insert collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLInsertRowString() );
MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not insert collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLInsertRowString() );
MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not delete collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLDeleteString() );
MessageHelper.collectionInfoString( this, id, getFactory() ) ); sqle, "could not delete collection: " + MessageHelper.collectionInfoString( this, id, getFactory() ), getSQLDeleteString() );