@Override public Type getType() { return getIndexType(); }
@Override public boolean indexExists(Serializable key, Object index, SharedSessionContractImplementor session) { return exists( key, incrementIndexByBase( index ), getIndexType(), sqlDetectRowByIndexString, session ); }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndexToWhere(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException { if ( indexContainsFormula ) { throw new AssertionFailure( "cannot use a formula-based index in the where condition" ); } getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, session ); return i + indexColumnAliases.length; }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndex(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException { getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, indexColumnIsSettable, session ); return i + ArrayHelper.countTrue( indexColumnIsSettable ); }
@Override public EntityDefinition toEntityDefinition() { if ( !getType().isEntityType() ) { throw new IllegalStateException( "Cannot treat collection index type as entity" ); } return (EntityPersister) ( (AssociationType) getIndexType() ).getAssociatedJoinable( getFactory() ); }
@Override public Object readIndex(ResultSet rs, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException { Object index = getIndexType().nullSafeGet( rs, aliases, session, null ); if ( index == null ) { throw new HibernateException( "null index column for collection: " + navigableRole.getFullPath() ); } index = decrementIndexByBase( index ); return index; }
try { getKeyType().nullSafeSet( st, key, 1, session ); getIndexType().nullSafeSet( st, incrementIndexByBase( index ), keyColumnNames.length + 1, session ); ResultSet rs = session.getJdbcCoordinator().getResultSetReturn().extract( st ); try {
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndexToWhere(PreparedStatement st, Object index, int i, SessionImplementor session) throws HibernateException, SQLException { if (indexIsFormula) throw new AssertionFailure("cannot use a formula-based index in the where condition"); if (baseIndex!=0) { index = new Integer( ( (Integer) index ).intValue() + baseIndex ); } getIndexType().nullSafeSet( st, index, i, session ); return i + indexColumnAliases.length; }
public Object readIndex(ResultSet rs, String[] aliases, SessionImplementor session) throws HibernateException, SQLException { Object index = getIndexType().nullSafeGet( rs, aliases, session, null ); if ( index == null ) { throw new HibernateException( "null index column for collection: " + role ); } if (baseIndex!=0) { index = new Integer( ( (Integer) index ).intValue() - baseIndex ); } return index; }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndex(PreparedStatement st, Object index, int i, SessionImplementor session) throws HibernateException, SQLException { if (baseIndex!=0) { index = new Integer( ( (Integer) index ).intValue() + baseIndex ); } getIndexType().nullSafeSet( st, index, i, indexColumnIsSettable, session ); return i + ArrayHelper.countTrue(indexColumnIsSettable); }
public boolean indexExists(Serializable key, Object index, SessionImplementor session) { return exists( key, incrementIndexByBase( index ), getIndexType(), sqlDetectRowByIndexString, session ); }
public boolean indexExists(Serializable key, Object index, SessionImplementor session) { return exists( key, incrementIndexByBase( index ), getIndexType(), sqlDetectRowByIndexString, session ); }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndexToWhere(PreparedStatement st, Object index, int i, SessionImplementor session) throws HibernateException, SQLException { if ( indexContainsFormula ) { throw new AssertionFailure( "cannot use a formula-based index in the where condition" ); } getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, session ); return i + indexColumnAliases.length; }
public Object readIndex(ResultSet rs, String[] aliases, SessionImplementor session) throws HibernateException, SQLException { Object index = getIndexType().nullSafeGet( rs, aliases, session, null ); if ( index == null ) { throw new HibernateException( "null index column for collection: " + role ); } index = decrementIndexByBase( index ); return index; }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndex(PreparedStatement st, Object index, int i, SessionImplementor session) throws HibernateException, SQLException { getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, indexColumnIsSettable, session ); return i + ArrayHelper.countTrue( indexColumnIsSettable ); }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndex(PreparedStatement st, Object index, int i, SessionImplementor session) throws HibernateException, SQLException { getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, indexColumnIsSettable, session ); return i + ArrayHelper.countTrue( indexColumnIsSettable ); }
public Object readIndex(ResultSet rs, String[] aliases, SessionImplementor session) throws HibernateException, SQLException { Object index = getIndexType().nullSafeGet( rs, aliases, session, null ); if ( index == null ) { throw new HibernateException( "null index column for collection: " + role ); } index = decrementIndexByBase( index ); return index; }
/** * Write the index to a JDBC <tt>PreparedStatement</tt> */ protected int writeIndexToWhere(PreparedStatement st, Object index, int i, SessionImplementor session) throws HibernateException, SQLException { if ( indexContainsFormula ) { throw new AssertionFailure( "cannot use a formula-based index in the where condition" ); } getIndexType().nullSafeSet( st, incrementIndexByBase( index ), i, session ); return i + indexColumnAliases.length; }
try { getKeyType().nullSafeSet( st, key, 1, session ); getIndexType().nullSafeSet( st, incrementIndexByBase( index ), keyColumnNames.length + 1, session ); ResultSet rs = st.executeQuery(); try {
try { getKeyType().nullSafeSet( st, key, 1, session ); getIndexType().nullSafeSet( st, incrementIndexByBase( index ), keyColumnNames.length + 1, session ); ResultSet rs = st.executeQuery(); try {