// Path: src/main/java/com/globalsight/ling/tm3/core/AbstractDataHandle.java
// abstract class TuIterator implements Iterator<TM3Tu<T>> {
// 
//     protected Iterator<TM3Tu<T>> currentPage;
//     protected long startId = 0;
//         
//     @Override
//     public boolean hasNext() {
//         if (currentPage != null && currentPage.hasNext()) {
//             return true;
//         }
//         loadPage();
//         return (currentPage != null && currentPage.hasNext());
//     }
// 
//     /**
//      * Subclasses must implement this.  This method should
//      * either set the currentPage member to an iterator to
//      * the next page or results, or else set it to null
//      * (indicating completion.)
//      */
//     protected abstract void loadPage();
//         
//     @Override
//     public TM3Tu<T> next() {
//         if (hasNext()) {
//             return currentPage.next();
//         }
//         return null;
//     }
// 
//     @Override
//     public void remove() {
//         throw new UnsupportedOperationException();
//     }
// }


import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Date;
import com.globalsight.ling.tm3.core.AbstractDataHandle.TuIterator;
            return getTm().getStorageInfo().getTuStorage()
                    .getTuCountByAttributes(inlineAttrs, customAttrs,
                                            getStart(), getEnd());
        } catch (SQLException e) {
            throw new TM3Exception(e);
        }
    }

    @Override
    public long getTuvCount() throws TM3Exception {
        try {
            return getTm().getStorageInfo().getTuStorage()
                    .getTuvCountByAttributes(inlineAttrs, customAttrs,
                                             getStart(), getEnd());
        } catch (SQLException e) {
            throw new TM3Exception(e);
        }
    }

    @Override
    public Iterator<TM3Tu<T>> iterator() throws TM3Exception {
        return new AttributesTuIterator();
    }

    @Override
    public void purgeData() throws TM3Exception {
        // Bailing on this one for now.  GlobalSight never calls it.
        throw new UnsupportedOperationException("Not yet implemented");
    }

// Path: src/main/java/com/globalsight/ling/tm3/core/AbstractDataHandle.java
// abstract class TuIterator implements Iterator<TM3Tu<T>> {
// 
//     protected Iterator<TM3Tu<T>> currentPage;
//     protected long startId = 0;
//         
//     @Override
//     public boolean hasNext() {
//         if (currentPage != null && currentPage.hasNext()) {
//             return true;
//         }
//         loadPage();
//         return (currentPage != null && currentPage.hasNext());
//     }
// 
//     /**
//      * Subclasses must implement this.  This method should
//      * either set the currentPage member to an iterator to
//      * the next page or results, or else set it to null
//      * (indicating completion.)
//      */
//     protected abstract void loadPage();
//         
//     @Override
//     public TM3Tu<T> next() {
//         if (hasNext()) {
//             return currentPage.next();
//         }
//         return null;
//     }
// 
//     @Override
//     public void remove() {
//         throw new UnsupportedOperationException();
//     }
// }


// Path: src/main/java/com/globalsight/ling/tm3/core/AttributeDataHandle.java
import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Date;
import com.globalsight.ling.tm3.core.AbstractDataHandle.TuIterator;

            return getTm().getStorageInfo().getTuStorage()
                    .getTuCountByAttributes(inlineAttrs, customAttrs,
                                            getStart(), getEnd());
        } catch (SQLException e) {
            throw new TM3Exception(e);
        }
    }

    @Override
    public long getTuvCount() throws TM3Exception {
        try {
            return getTm().getStorageInfo().getTuStorage()
                    .getTuvCountByAttributes(inlineAttrs, customAttrs,
                                             getStart(), getEnd());
        } catch (SQLException e) {
            throw new TM3Exception(e);
        }
    }

    @Override
    public Iterator<TM3Tu<T>> iterator() throws TM3Exception {
        return new AttributesTuIterator();
    }

    @Override
    public void purgeData() throws TM3Exception {
        // Bailing on this one for now.  GlobalSight never calls it.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    class AttributesTuIterator extends TuIterator {