summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2011-08-21 03:37:22 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2011-08-21 03:37:22 +0000
commit59d17a49c002e61f2709b5a9a8d8886e1fe1f0d6 (patch)
treed4af03cd8f5b30f92336bf761794afd921437f46 /src
parent1dd198ece14ae2c801e2e4195edd7d15a4fbf9b1 (diff)
downloadjackcess-59d17a49c002e61f2709b5a9a8d8886e1fe1f0d6.tar.gz
jackcess-59d17a49c002e61f2709b5a9a8d8886e1fe1f0d6.zip
start adding some usage information in javadoc
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@574 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src')
-rw-r--r--src/java/com/healthmarketscience/jackcess/Column.java187
-rw-r--r--src/java/com/healthmarketscience/jackcess/Database.java124
-rw-r--r--src/java/com/healthmarketscience/jackcess/Table.java145
-rw-r--r--src/site/javadoc/stylesheet.css72
-rw-r--r--src/site/javadoc/taglets.properties41
5 files changed, 518 insertions, 51 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java
index 6d79dd9..78dd81b 100644
--- a/src/java/com/healthmarketscience/jackcess/Column.java
+++ b/src/java/com/healthmarketscience/jackcess/Column.java
@@ -61,6 +61,7 @@ import org.apache.commons.logging.LogFactory;
/**
* Access database column definition
* @author Tim McCune
+ * @usage _general_class_
*/
public class Column implements Comparable<Column> {
@@ -70,12 +71,14 @@ public class Column implements Comparable<Column> {
* Meaningless placeholder object for inserting values in an autonumber
* column. it is not required that this value be used (any passed in value
* is ignored), but using this placeholder may make code more obvious.
+ * @usage _general_field_
*/
public static final Object AUTO_NUMBER = "<AUTO_NUMBER>";
/**
* Meaningless placeholder object for updating rows which indicates that a
* given column should keep its existing value.
+ * @usage _general_field_
*/
public static final Object KEEP_VALUE = "<KEEP_VALUE>";
@@ -113,16 +116,28 @@ public class Column implements Comparable<Column> {
*/
private static final int LONG_VALUE_TYPE_MASK = 0xC0000000;
- /** mask for the fixed len bit */
+ /**
+ * mask for the fixed len bit
+ * @usage _advanced_field_
+ */
public static final byte FIXED_LEN_FLAG_MASK = (byte)0x01;
- /** mask for the auto number bit */
+ /**
+ * mask for the auto number bit
+ * @usage _advanced_field_
+ */
public static final byte AUTO_NUMBER_FLAG_MASK = (byte)0x04;
- /** mask for the auto number guid bit */
+ /**
+ * mask for the auto number guid bit
+ * @usage _advanced_field_
+ */
public static final byte AUTO_NUMBER_GUID_FLAG_MASK = (byte)0x40;
- /** mask for the unknown bit (possible "can be null"?) */
+ /**
+ * mask for the unknown bit (possible "can be null"?)
+ * @usage _advanced_field_
+ */
public static final byte UNKNOWN_FLAG_MASK = (byte)0x02;
// some other flags?
@@ -132,11 +147,17 @@ public class Column implements Comparable<Column> {
/** the value for the "general" sort order */
private static final short GENERAL_SORT_ORDER_VALUE = 1033;
- /** the "general" text sort order, legacy version (access 2000-2007) */
+ /**
+ * the "general" text sort order, legacy version (access 2000-2007)
+ * @usage _intermediate_field_
+ */
public static final SortOrder GENERAL_LEGACY_SORT_ORDER =
new SortOrder(GENERAL_SORT_ORDER_VALUE, (byte)0);
- /** the "general" text sort order, latest version (access 2010+) */
+ /**
+ * the "general" text sort order, latest version (access 2010+)
+ * @usage _intermediate_field_
+ */
public static final SortOrder GENERAL_SORT_ORDER =
new SortOrder(GENERAL_SORT_ORDER_VALUE, (byte)1);
@@ -186,10 +207,16 @@ public class Column implements Comparable<Column> {
/** properties for this column, if any */
private PropertyMap _props;
+ /**
+ * @usage _general_method_
+ */
public Column() {
this(null);
}
+ /**
+ * @usage _advanced_method_
+ */
public Column(JetFormat format) {
_table = null;
}
@@ -209,6 +236,7 @@ public class Column implements Comparable<Column> {
* @param table owning table
* @param buffer Buffer containing column definition
* @param offset Offset in the buffer at which the column definition starts
+ * @usage _advanced_method_
*/
public Column(Table table, ByteBuffer buffer, int offset, int displayIndex)
throws IOException
@@ -265,62 +293,108 @@ public class Column implements Comparable<Column> {
}
}
+ /**
+ * @usage _general_method_
+ */
public Table getTable() {
return _table;
}
+ /**
+ * @usage _general_method_
+ */
public Database getDatabase() {
return getTable().getDatabase();
}
+ /**
+ * @usage _advanced_method_
+ */
public JetFormat getFormat() {
return getDatabase().getFormat();
}
+ /**
+ * @usage _advanced_method_
+ */
public PageChannel getPageChannel() {
return getDatabase().getPageChannel();
}
+ /**
+ * @usage _general_method_
+ */
public String getName() {
return _name;
}
+
+ /**
+ * @usage _advanced_method_
+ */
public void setName(String name) {
_name = name;
}
+ /**
+ * @usage _advanced_method_
+ */
public boolean isVariableLength() {
return _variableLength;
}
+ /**
+ * @usage _advanced_method_
+ */
public void setVariableLength(boolean variableLength) {
_variableLength = variableLength;
}
+ /**
+ * @usage _general_method_
+ */
public boolean isAutoNumber() {
return _autoNumber;
}
+ /**
+ * @usage _general_method_
+ */
public void setAutoNumber(boolean autoNumber) {
_autoNumber = autoNumber;
setAutoNumberGenerator();
}
+ /**
+ * @usage _advanced_method_
+ */
public short getColumnNumber() {
return _columnNumber;
}
+ /**
+ * @usage _advanced_method_
+ */
public void setColumnNumber(short newColumnNumber) {
_columnNumber = newColumnNumber;
}
+ /**
+ * @usage _advanced_method_
+ */
public int getColumnIndex() {
return _columnIndex;
}
+ /**
+ * @usage _advanced_method_
+ */
public void setColumnIndex(int newColumnIndex) {
_columnIndex = newColumnIndex;
}
+ /**
+ * @usage _advanced_method_
+ */
public int getDisplayIndex() {
return _displayIndex;
}
@@ -329,6 +403,7 @@ public class Column implements Comparable<Column> {
* Also sets the length and the variable length flag, inferred from the
* type. For types with scale/precision, sets the scale and precision to
* default values.
+ * @usage _general_method_
*/
public void setType(DataType type) {
_type = type;
@@ -343,88 +418,154 @@ public class Column implements Comparable<Column> {
setPrecision((byte)type.getDefaultPrecision());
}
}
+
+ /**
+ * @usage _general_method_
+ */
public DataType getType() {
return _type;
}
+ /**
+ * @usage _general_method_
+ */
public int getSQLType() throws SQLException {
return _type.getSQLType();
}
+ /**
+ * @usage _general_method_
+ */
public void setSQLType(int type) throws SQLException {
setSQLType(type, 0);
}
+ /**
+ * @usage _general_method_
+ */
public void setSQLType(int type, int lengthInUnits) throws SQLException {
setType(DataType.fromSQLType(type, lengthInUnits));
}
+ /**
+ * @usage _general_method_
+ */
public boolean isCompressedUnicode() {
return _textInfo._compressedUnicode;
}
+ /**
+ * @usage _general_method_
+ */
public void setCompressedUnicode(boolean newCompessedUnicode) {
modifyTextInfo();
_textInfo._compressedUnicode = newCompessedUnicode;
}
+ /**
+ * @usage _general_method_
+ */
public byte getPrecision() {
return _numericInfo._precision;
}
+ /**
+ * @usage _general_method_
+ */
public void setPrecision(byte newPrecision) {
modifyNumericInfo();
_numericInfo._precision = newPrecision;
}
+ /**
+ * @usage _general_method_
+ */
public byte getScale() {
return _numericInfo._scale;
}
+ /**
+ * @usage _general_method_
+ */
public void setScale(byte newScale) {
modifyNumericInfo();
_numericInfo._scale = newScale;
}
-
+
+ /**
+ * @usage _intermediate_method_
+ */
public SortOrder getTextSortOrder() {
return _textInfo._sortOrder;
}
+ /**
+ * @usage _advanced_method_
+ */
public void setTextSortOrder(SortOrder newTextSortOrder) {
modifyTextInfo();
_textInfo._sortOrder = newTextSortOrder;
}
+ /**
+ * @usage _intermediate_method_
+ */
public short getTextCodePage() {
return _textInfo._codePage;
}
+ /**
+ * @usage _general_method_
+ */
public void setLength(short length) {
_columnLength = length;
}
+
+ /**
+ * @usage _general_method_
+ */
public short getLength() {
return _columnLength;
}
+ /**
+ * @usage _general_method_
+ */
public void setLengthInUnits(short unitLength) {
setLength((short)getType().fromUnitSize(unitLength));
}
+
+ /**
+ * @usage _general_method_
+ */
public short getLengthInUnits() {
return (short)getType().toUnitSize(getLength());
}
+ /**
+ * @usage _advanced_method_
+ */
public void setVarLenTableIndex(int idx) {
_varLenTableIndex = idx;
}
+ /**
+ * @usage _advanced_method_
+ */
public int getVarLenTableIndex() {
return _varLenTableIndex;
}
+ /**
+ * @usage _advanced_method_
+ */
public void setFixedDataOffset(int newOffset) {
_fixedDataOffset = newOffset;
}
+ /**
+ * @usage _advanced_method_
+ */
public int getFixedDataOffset() {
return _fixedDataOffset;
}
@@ -477,6 +618,7 @@ public class Column implements Comparable<Column> {
/**
* Returns the AutoNumberGenerator for this column if this is an autonumber
* column, {@code null} otherwise.
+ * @usage _advanced_method_
*/
public AutoNumberGenerator getAutoNumberGenerator() {
return _autoNumberGenerator;
@@ -484,6 +626,7 @@ public class Column implements Comparable<Column> {
/**
* @return the properties for this column
+ * @usage _general_method_
*/
public PropertyMap getProperties() throws IOException {
if(_props == null) {
@@ -508,6 +651,7 @@ public class Column implements Comparable<Column> {
* Checks that this column definition is valid.
*
* @throws IllegalArgumentException if this column definition is invalid.
+ * @usage _advanced_method_
*/
public void validate(JetFormat format) {
if(getType() == null) {
@@ -572,6 +716,7 @@ public class Column implements Comparable<Column> {
* Deserialize a raw byte value for this column into an Object
* @param data The raw byte value
* @return The deserialized Object
+ * @usage _advanced_method_
*/
public Object read(byte[] data) throws IOException {
return read(data, PageChannel.DEFAULT_BYTE_ORDER);
@@ -582,6 +727,7 @@ public class Column implements Comparable<Column> {
* @param data The raw byte value
* @param order Byte order in which the raw value is stored
* @return The deserialized Object
+ * @usage _advanced_method_
*/
public Object read(byte[] data, ByteOrder order) throws IOException {
ByteBuffer buffer = ByteBuffer.wrap(data);
@@ -742,7 +888,7 @@ public class Column implements Comparable<Column> {
* @return BigDecimal representing the monetary value
* @throws IOException if the value cannot be parsed
*/
- private BigDecimal readCurrencyValue(ByteBuffer buffer)
+ private static BigDecimal readCurrencyValue(ByteBuffer buffer)
throws IOException
{
if(buffer.remaining() != 8) {
@@ -755,7 +901,7 @@ public class Column implements Comparable<Column> {
/**
* Writes "Currency" values.
*/
- private void writeCurrencyValue(ByteBuffer buffer, Object value)
+ private static void writeCurrencyValue(ByteBuffer buffer, Object value)
throws IOException
{
try {
@@ -919,7 +1065,7 @@ public class Column implements Comparable<Column> {
/**
* Decodes a GUID value.
*/
- private String readGUIDValue(ByteBuffer buffer, ByteOrder order)
+ private static String readGUIDValue(ByteBuffer buffer, ByteOrder order)
{
if(order != ByteOrder.BIG_ENDIAN) {
byte[] tmpArr = new byte[16];
@@ -956,8 +1102,8 @@ public class Column implements Comparable<Column> {
/**
* Writes a GUID value.
*/
- private void writeGUIDValue(ByteBuffer buffer, Object value,
- ByteOrder order)
+ private static void writeGUIDValue(ByteBuffer buffer, Object value,
+ ByteOrder order)
throws IOException
{
Matcher m = GUID_PATTERN.matcher(toCharSequence(value));
@@ -997,6 +1143,7 @@ public class Column implements Comparable<Column> {
* @param value Value of the LVAL column
* @return A buffer containing the LVAL definition and (possibly) the column
* value (unless written to other pages)
+ * @usage _advanced_method_
*/
public ByteBuffer writeLongValue(byte[] value,
int remainingRowLength) throws IOException
@@ -1171,6 +1318,7 @@ public class Column implements Comparable<Column> {
* endian order
* @param obj Object to serialize
* @return A buffer containing the bytes
+ * @usage _advanced_method_
*/
public ByteBuffer write(Object obj, int remainingRowLength)
throws IOException
@@ -1183,6 +1331,7 @@ public class Column implements Comparable<Column> {
* @param obj Object to serialize
* @param order Order in which to serialize
* @return A buffer containing the bytes
+ * @usage _advanced_method_
*/
public ByteBuffer write(Object obj, int remainingRowLength, ByteOrder order)
throws IOException
@@ -1253,6 +1402,7 @@ public class Column implements Comparable<Column> {
* @param obj Object to serialize
* @param order Order in which to serialize
* @return A buffer containing the bytes
+ * @usage _advanced_method_
*/
public ByteBuffer writeFixedLengthField(Object obj, ByteOrder order)
throws IOException
@@ -1520,6 +1670,7 @@ public class Column implements Comparable<Column> {
* @param textBytes bytes of text to decode
* @param charset relevant charset
* @return the decoded string
+ * @usage _advanced_method_
*/
public static String decodeUncompressedText(byte[] textBytes,
Charset charset)
@@ -1532,6 +1683,7 @@ public class Column implements Comparable<Column> {
* @param text Text to encode
* @param charset database charset
* @return A buffer with the text encoded
+ * @usage _advanced_method_
*/
public static ByteBuffer encodeUncompressedText(CharSequence text,
Charset charset)
@@ -1542,6 +1694,10 @@ public class Column implements Comparable<Column> {
}
+ /**
+ * Orders Columns by column number.
+ * @usage _general_method_
+ */
public int compareTo(Column other) {
if (_columnNumber > other.getColumnNumber()) {
return 1;
@@ -1555,6 +1711,7 @@ public class Column implements Comparable<Column> {
/**
* @param columns A list of columns in a table definition
* @return The number of variable length columns found in the list
+ * @usage _advanced_method_
*/
public static short countVariableLength(List<Column> columns) {
short rtn = 0;
@@ -1570,6 +1727,7 @@ public class Column implements Comparable<Column> {
* @param columns A list of columns in a table definition
* @return The number of variable length columns which are not long values
* found in the list
+ * @usage _advanced_method_
*/
public static short countNonLongVariableLength(List<Column> columns) {
short rtn = 0;
@@ -1617,6 +1775,7 @@ public class Column implements Comparable<Column> {
/**
* @return an appropriate CharSequence representation of the given object.
+ * @usage _advanced_method_
*/
public static CharSequence toCharSequence(Object value)
throws IOException
@@ -1649,6 +1808,7 @@ public class Column implements Comparable<Column> {
/**
* @return an appropriate byte[] representation of the given object.
+ * @usage _advanced_method_
*/
public static byte[] toByteArray(Object value)
throws IOException
@@ -1688,6 +1848,7 @@ public class Column implements Comparable<Column> {
/**
* Interpret a boolean value (null == false)
+ * @usage _advanced_method_
*/
public static boolean toBooleanValue(Object obj) {
return ((obj != null) && ((Boolean)obj).booleanValue());
@@ -1912,6 +2073,7 @@ public class Column implements Comparable<Column> {
/**
* Base class for the supported autonumber types.
+ * @usage _advanced_class_
*/
public abstract class AutoNumberGenerator
{
@@ -2030,6 +2192,7 @@ public class Column implements Comparable<Column> {
/**
* Information about the sort order (collation) for a textual column.
+ * @usage _intermediate_class_
*/
public static final class SortOrder
{
diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java
index 3682f13..549be7f 100644
--- a/src/java/com/healthmarketscience/jackcess/Database.java
+++ b/src/java/com/healthmarketscience/jackcess/Database.java
@@ -84,6 +84,7 @@ import org.apache.commons.logging.LogFactory;
* </ul>
*
* @author Tim McCune
+ * @usage _general_class_
*/
public class Database
implements Iterable<Table>, Closeable, Flushable
@@ -100,52 +101,74 @@ public class Database
}
/** default value for the auto-sync value ({@code true}). this is slower,
- but leaves more chance of a useable database in the face of failures. */
+ * but leaves more chance of a useable database in the face of failures.
+ * @usage _general_field_
+ */
public static final boolean DEFAULT_AUTO_SYNC = true;
/** the default value for the resource path used to load classpath
- resources. */
+ * resources.
+ * @usage _general_field_
+ */
public static final String DEFAULT_RESOURCE_PATH =
"com/healthmarketscience/jackcess/";
- /** the default sort order for table columns. */
+ /**
+ * the default sort order for table columns.
+ * @usage _intermediate_field_
+ */
public static final Table.ColumnOrder DEFAULT_COLUMN_ORDER =
Table.ColumnOrder.DATA;
/** (boolean) system property which can be used to disable the default big
- index support. */
+ * index support.
+ * @usage _general_field_
+ */
public static final String USE_BIG_INDEX_PROPERTY =
"com.healthmarketscience.jackcess.bigIndex";
/** system property which can be used to set the default TimeZone used for
- date calculations. */
+ * date calculations.
+ * @usage _general_field_
+ */
public static final String TIMEZONE_PROPERTY =
"com.healthmarketscience.jackcess.timeZone";
/** system property prefix which can be used to set the default Charset
- used for text data (full property includes the JetFormat version). */
+ * used for text data (full property includes the JetFormat version).
+ * @usage _general_field_
+ */
public static final String CHARSET_PROPERTY_PREFIX =
"com.healthmarketscience.jackcess.charset.";
/** system property which can be used to set the path from which classpath
- resources are loaded (must end with a "/" if non-empty). Default value
- is {@link #DEFAULT_RESOURCE_PATH} if unspecified. */
+ * resources are loaded (must end with a "/" if non-empty). Default value
+ * is {@link #DEFAULT_RESOURCE_PATH} if unspecified.
+ * @usage _general_field_
+ */
public static final String RESOURCE_PATH_PROPERTY =
"com.healthmarketscience.jackcess.resourcePath";
/** (boolean) system property which can be used to indicate that the current
- vm has a poor nio implementation (specifically for
- FileChannel.transferFrom) */
+ * vm has a poor nio implementation (specifically for
+ * FileChannel.transferFrom)
+ * @usage _intermediate_field_
+ */
public static final String BROKEN_NIO_PROPERTY =
"com.healthmarketscience.jackcess.brokenNio";
/** system property which can be used to set the default sort order for
- table columns. Value should be one {@link Table.ColumnOrder} enum
- values. */
+ * table columns. Value should be one {@link Table.ColumnOrder} enum
+ * values.
+ * @usage _intermediate_field_
+ */
public static final String COLUMN_ORDER_PROPERTY =
"com.healthmarketscience.jackcess.columnOrder";
- /** default error handler used if none provided (just rethrows exception) */
+ /**
+ * default error handler used if none provided (just rethrows exception)
+ * @usage _general_field_
+ */
public static final ErrorHandler DEFAULT_ERROR_HANDLER = new ErrorHandler() {
public Object handleRowError(Column column,
byte[] columnData,
@@ -239,7 +262,11 @@ public class Database
/** all flags which seem to indicate some type of system object */
static final int SYSTEM_OBJECT_FLAGS =
SYSTEM_OBJECT_FLAG | ALT_SYSTEM_OBJECT_FLAG;
-
+
+ /**
+ * Enum which indicates which version of Access created the database.
+ * @usage _general_class_
+ */
public static enum FileFormat {
V1997(null, JetFormat.VERSION_3),
@@ -434,6 +461,7 @@ public class Database
* @param mdbFile File containing the database
*
* @see #open(File,boolean)
+ * @usage _general_method_
*/
public static Database open(File mdbFile) throws IOException {
return open(mdbFile, false);
@@ -452,6 +480,7 @@ public class Database
* mode
*
* @see #open(File,boolean,boolean)
+ * @usage _general_method_
*/
public static Database open(File mdbFile, boolean readOnly)
throws IOException
@@ -473,6 +502,7 @@ public class Database
* the jvm's leisure, which can be much faster, but may
* leave the database in an inconsistent state if failures
* are encountered during writing.
+ * @usage _general_method_
*/
public static Database open(File mdbFile, boolean readOnly, boolean autoSync)
throws IOException
@@ -496,6 +526,7 @@ public class Database
* are encountered during writing.
* @param charset Charset to use, if {@code null}, uses default
* @param timeZone TimeZone to use, if {@code null}, uses default
+ * @usage _intermediate_method_
*/
public static Database open(File mdbFile, boolean readOnly, boolean autoSync,
Charset charset, TimeZone timeZone)
@@ -522,6 +553,7 @@ public class Database
* @param timeZone TimeZone to use, if {@code null}, uses default
* @param provider CodecProvider for handling page encoding/decoding, may be
* {@code null} if no special encoding is necessary
+ * @usage _intermediate_method_
*/
public static Database open(File mdbFile, boolean readOnly, boolean autoSync,
Charset charset, TimeZone timeZone,
@@ -567,6 +599,7 @@ public class Database
* already exists, it will be overwritten.</b>
*
* @see #create(File,boolean)
+ * @usage _general_method_
*/
public static Database create(File mdbFile) throws IOException {
return create(mdbFile, DEFAULT_AUTO_SYNC);
@@ -583,6 +616,7 @@ public class Database
* already exists, it will be overwritten.</b>
*
* @see #create(File,boolean)
+ * @usage _general_method_
*/
public static Database create(FileFormat fileFormat, File mdbFile)
throws IOException
@@ -606,6 +640,7 @@ public class Database
* the jvm's leisure, which can be much faster, but may
* leave the database in an inconsistent state if failures
* are encountered during writing.
+ * @usage _general_method_
*/
public static Database create(File mdbFile, boolean autoSync)
throws IOException
@@ -626,6 +661,7 @@ public class Database
* the jvm's leisure, which can be much faster, but may
* leave the database in an inconsistent state if failures
* are encountered during writing.
+ * @usage _general_method_
*/
public static Database create(FileFormat fileFormat, File mdbFile,
boolean autoSync)
@@ -649,6 +685,7 @@ public class Database
* are encountered during writing.
* @param charset Charset to use, if {@code null}, uses default
* @param timeZone TimeZone to use, if {@code null}, uses default
+ * @usage _intermediate_method_
*/
public static Database create(FileFormat fileFormat, File mdbFile,
boolean autoSync, Charset charset,
@@ -740,16 +777,23 @@ public class Database
}
}
+ /**
+ * @usage _advanced_method_
+ */
public PageChannel getPageChannel() {
return _pageChannel;
}
+ /**
+ * @usage _advanced_method_
+ */
public JetFormat getFormat() {
return _format;
}
/**
* @return The system catalog table
+ * @usage _advanced_method_
*/
public Table getSystemCatalog() {
return _systemCatalog;
@@ -757,6 +801,7 @@ public class Database
/**
* @return The system Access Control Entries table (loaded on demand)
+ * @usage _advanced_method_
*/
public Table getAccessControlEntries() throws IOException {
if(_accessControlEntries == null) {
@@ -772,6 +817,7 @@ public class Database
/**
* @return the complex column system table (loaded on demand)
+ * @usage _advanced_method_
*/
public Table getSystemComplexColumns() throws IOException {
if(_complexCols == null) {
@@ -786,6 +832,7 @@ public class Database
/**
* Whether or not big index support is enabled for tables.
+ * @usage _advanced_method_
*/
public boolean doUseBigIndex() {
return (_useBigIndex != null ? _useBigIndex : true);
@@ -793,6 +840,7 @@ public class Database
/**
* Set whether or not big index support is enabled for tables.
+ * @usage _intermediate_method_
*/
public void setUseBigIndex(boolean useBigIndex) {
_useBigIndex = useBigIndex;
@@ -802,6 +850,7 @@ public class Database
* Gets the currently configured ErrorHandler (always non-{@code null}).
* This will be used to handle all errors unless overridden at the Table or
* Cursor level.
+ * @usage _intermediate_method_
*/
public ErrorHandler getErrorHandler() {
return((_dbErrorHandler != null) ? _dbErrorHandler :
@@ -811,6 +860,7 @@ public class Database
/**
* Sets a new ErrorHandler. If {@code null}, resets to the
* {@link #DEFAULT_ERROR_HANDLER}.
+ * @usage _intermediate_method_
*/
public void setErrorHandler(ErrorHandler newErrorHandler) {
_dbErrorHandler = newErrorHandler;
@@ -818,15 +868,16 @@ public class Database
/**
* Gets currently configured TimeZone (always non-{@code null}).
+ * @usage _intermediate_method_
*/
- public TimeZone getTimeZone()
- {
+ public TimeZone getTimeZone() {
return _timeZone;
}
/**
* Sets a new TimeZone. If {@code null}, resets to the value returned by
* {@link #getDefaultTimeZone}.
+ * @usage _intermediate_method_
*/
public void setTimeZone(TimeZone newTimeZone) {
if(newTimeZone == null) {
@@ -837,6 +888,7 @@ public class Database
/**
* Gets currently configured Charset (always non-{@code null}).
+ * @usage _intermediate_method_
*/
public Charset getCharset()
{
@@ -846,6 +898,7 @@ public class Database
/**
* Sets a new Charset. If {@code null}, resets to the value returned by
* {@link #getDefaultCharset}.
+ * @usage _intermediate_method_
*/
public void setCharset(Charset newCharset) {
if(newCharset == null) {
@@ -857,6 +910,7 @@ public class Database
/**
* Gets currently configured {@link Table.ColumnOrder} (always non-{@code
* null}).
+ * @usage _intermediate_method_
*/
public Table.ColumnOrder getColumnOrder() {
return _columnOrder;
@@ -865,6 +919,7 @@ public class Database
/**
* Sets a new Table.ColumnOrder. If {@code null}, resets to the value
* returned by {@link #getDefaultColumnOrder}.
+ * @usage _intermediate_method_
*/
public void setColumnOrder(Table.ColumnOrder newColumnOrder) {
if(newColumnOrder == null) {
@@ -888,6 +943,7 @@ public class Database
* Returns the FileFormat of this database (which may involve inspecting the
* database itself).
* @throws IllegalStateException if the file format cannot be determined
+ * @usage _general_method_
*/
public FileFormat getFileFormat() throws IOException {
@@ -950,6 +1006,7 @@ public class Database
/**
* @return the currently configured database default language sort order for
* textual columns
+ * @usage _intermediate_method_
*/
public Column.SortOrder getDefaultSortOrder() throws IOException {
@@ -962,6 +1019,7 @@ public class Database
/**
* @return the currently configured database default code page for textual
* data (may not be relevant to all database versions)
+ * @usage _intermediate_method_
*/
public short getDefaultCodePage() throws IOException {
@@ -989,6 +1047,7 @@ public class Database
/**
* @return a PropertyMaps instance decoded from the given bytes (always
* returns non-{@code null} result).
+ * @usage _intermediate_method_
*/
public PropertyMaps readProperties(byte[] propsBytes, int objectId)
throws IOException
@@ -1034,6 +1093,7 @@ public class Database
/**
* @return The names of all of the user tables (String)
+ * @usage _general_method_
*/
public Set<String> getTableNames() throws IOException {
if(_tableNames == null) {
@@ -1050,6 +1110,7 @@ public class Database
* to read these tables, you must use {@link #getSystemTable}.
* <i>Extreme care should be taken if modifying these tables
* directly!</i>.
+ * @usage _intermediate_method_
*/
public Set<String> getSystemTableNames() throws IOException {
Set<String> sysTableNames =
@@ -1064,6 +1125,7 @@ public class Database
* operations, the actual exception will be contained within
* @throws ConcurrentModificationException if a table is added to the
* database while an Iterator is in use.
+ * @usage _general_method_
*/
public Iterator<Table> iterator() {
return new TableIterator();
@@ -1072,6 +1134,7 @@ public class Database
/**
* @param name Table name
* @return The table, or null if it doesn't exist
+ * @usage _general_method_
*/
public Table getTable(String name) throws IOException {
return getTable(name, defaultUseBigIndex());
@@ -1083,6 +1146,7 @@ public class Database
* for the table (this value will override any other
* settings)
* @return The table, or null if it doesn't exist
+ * @usage _intermediate_method_
*/
public Table getTable(String name, boolean useBigIndex) throws IOException {
return getTable(name, false, useBigIndex);
@@ -1091,6 +1155,7 @@ public class Database
/**
* @param tableDefPageNumber the page number of a table definition
* @return The table, or null if it doesn't exist
+ * @usage _advanced_method_
*/
public Table getTable(int tableDefPageNumber) throws IOException {
@@ -1142,6 +1207,7 @@ public class Database
* Create a new table in this database
* @param name Name of the table to create
* @param columns List of Columns in the table
+ * @usage _general_method_
*/
public void createTable(String name, List<Column> columns)
throws IOException
@@ -1154,6 +1220,7 @@ public class Database
* @param name Name of the table to create
* @param columns List of Columns in the table
* @param indexes List of IndexBuilders describing indexes for the table
+ * @usage _general_method_
*/
public void createTable(String name, List<Column> columns,
List<IndexBuilder> indexes)
@@ -1248,6 +1315,7 @@ public class Database
/**
* Finds all the relationships in the database between the given tables.
+ * @usage _intermediate_method_
*/
public List<Relationship> getRelationships(Table table1, Table table2)
throws IOException
@@ -1287,6 +1355,7 @@ public class Database
/**
* Finds all the queries in the database.
+ * @usage _intermediate_method_
*/
public List<Query> getQueries()
throws IOException
@@ -1350,6 +1419,7 @@ public class Database
*
* @param tableName Table name, may be a system table
* @return The table, or {@code null} if it doesn't exist
+ * @usage _intermediate_method_
*/
public Table getSystemTable(String tableName)
throws IOException
@@ -1359,6 +1429,7 @@ public class Database
/**
* @return the core properties for the database
+ * @usage _general_method_
*/
public PropertyMap getDatabaseProperties() throws IOException {
if(_dbPropMaps == null) {
@@ -1369,6 +1440,7 @@ public class Database
/**
* @return the summary properties for the database
+ * @usage _general_method_
*/
public PropertyMap getSummaryProperties() throws IOException {
if(_summaryPropMaps == null) {
@@ -1379,6 +1451,7 @@ public class Database
/**
* @return the user-defined properties for the database
+ * @usage _general_method_
*/
public PropertyMap getUserDefinedProperties() throws IOException {
if(_userDefPropMaps == null) {
@@ -1389,6 +1462,7 @@ public class Database
/**
* @return the PropertyMaps for the object with the given id
+ * @usage _advanced_method_
*/
public PropertyMaps getPropertiesForObject(int objectId)
throws IOException
@@ -1430,6 +1504,7 @@ public class Database
/**
* @return the current database password, or {@code null} if none set.
+ * @usage _general_method_
*/
public String getDatabasePassword() throws IOException
{
@@ -1481,7 +1556,7 @@ public class Database
* Finds the relationships matching the given from and to tables from the
* given cursor and adds them to the given list.
*/
- private void collectRelationships(
+ private static void collectRelationships(
Cursor cursor, Table fromTable, Table toTable,
List<Relationship> relationships)
{
@@ -1677,6 +1752,7 @@ public class Database
* @return the name of the copied table
*
* @see ImportUtil#importResultSet(ResultSet,Database,String)
+ * @usage _general_method_
*/
public String copyTable(String name, ResultSet source)
throws SQLException, IOException
@@ -1694,6 +1770,7 @@ public class Database
* @return the name of the imported table
*
* @see ImportUtil#importResultSet(ResultSet,Database,String,ImportFilter)
+ * @usage _general_method_
*/
public String copyTable(String name, ResultSet source, ImportFilter filter)
throws SQLException, IOException
@@ -1711,6 +1788,7 @@ public class Database
* @return the name of the imported table
*
* @see ImportUtil#importFile(File,Database,String,String)
+ * @usage _general_method_
*/
public String importFile(String name, File f, String delim)
throws IOException
@@ -1729,6 +1807,7 @@ public class Database
* @return the name of the imported table
*
* @see ImportUtil#importFile(File,Database,String,String,ImportFilter)
+ * @usage _general_method_
*/
public String importFile(String name, File f, String delim,
ImportFilter filter)
@@ -1747,6 +1826,7 @@ public class Database
* @return the name of the imported table
*
* @see ImportUtil#importReader(BufferedReader,Database,String,String)
+ * @usage _general_method_
*/
public String importReader(String name, BufferedReader in, String delim)
throws IOException
@@ -1764,6 +1844,7 @@ public class Database
* @return the name of the imported table
*
* @see ImportUtil#importReader(BufferedReader,Database,String,String,ImportFilter)
+ * @usage _general_method_
*/
public String importReader(String name, BufferedReader in, String delim,
ImportFilter filter)
@@ -1774,6 +1855,7 @@ public class Database
/**
* Flushes any current changes to the database file to disk.
+ * @usage _general_method_
*/
public void flush() throws IOException {
_pageChannel.flush();
@@ -1781,6 +1863,7 @@ public class Database
/**
* Close the database file
+ * @usage _general_method_
*/
public void close() throws IOException {
_pageChannel.close();
@@ -1788,6 +1871,7 @@ public class Database
/**
* @return A table or column name escaped for Access
+ * @usage _general_method_
*/
public static String escapeIdentifier(String s) {
if (isReservedWord(s)) {
@@ -1799,6 +1883,7 @@ public class Database
/**
* @return {@code true} if the given string is a reserved word,
* {@code false} otherwise
+ * @usage _general_method_
*/
public static boolean isReservedWord(String s) {
return RESERVED_WORDS.contains(s.toLowerCase());
@@ -1806,6 +1891,7 @@ public class Database
/**
* Validates an identifier name.
+ * @usage _advanced_method_
*/
public static void validateIdentifierName(String name,
int maxLength,
@@ -1877,6 +1963,7 @@ public class Database
/**
* Returns {@code false} if "big index support" has been disabled explicity
* on the this Database or via a system property, {@code true} otherwise.
+ * @usage _advanced_method_
*/
public boolean defaultUseBigIndex() {
if(_useBigIndex != null) {
@@ -1893,6 +1980,7 @@ public class Database
* Returns the default TimeZone. This is normally the platform default
* TimeZone as returned by {@link TimeZone#getDefault}, but can be
* overridden using the system property {@value #TIMEZONE_PROPERTY}.
+ * @usage _advanced_method_
*/
public static TimeZone getDefaultTimeZone()
{
@@ -1915,6 +2003,7 @@ public class Database
* {@value #CHARSET_PROPERTY_PREFIX} followed by the JetFormat version to
* which the charset should apply, e.g. {@code
* "com.healthmarketscience.jackcess.charset.VERSION_3"}.
+ * @usage _advanced_method_
*/
public static Charset getDefaultCharset(JetFormat format)
{
@@ -1934,6 +2023,7 @@ public class Database
* Returns the default Table.ColumnOrder. This defaults to
* {@link #DEFAULT_COLUMN_ORDER}, but can be overridden using the system
* property {@value #COLUMN_ORDER_PROPERTY}.
+ * @usage _advanced_method_
*/
public static Table.ColumnOrder getDefaultColumnOrder()
{
diff --git a/src/java/com/healthmarketscience/jackcess/Table.java b/src/java/com/healthmarketscience/jackcess/Table.java
index b007753..f5e07c0 100644
--- a/src/java/com/healthmarketscience/jackcess/Table.java
+++ b/src/java/com/healthmarketscience/jackcess/Table.java
@@ -49,6 +49,7 @@ import org.apache.commons.logging.LogFactory;
* Is not thread-safe.
*
* @author Tim McCune
+ * @usage _general_class_
*/
public class Table
implements Iterable<Map<String, Object>>
@@ -66,12 +67,21 @@ public class Table
private static final int MAX_BYTE = 256;
- /** Table type code for system tables */
+ /**
+ * Table type code for system tables
+ * @usage _intermediate_class_
+ */
public static final byte TYPE_SYSTEM = 0x53;
- /** Table type code for user tables */
+ /**
+ * Table type code for user tables
+ * @usage _intermediate_class_
+ */
public static final byte TYPE_USER = 0x4e;
- /** enum which controls the ordering of the columns in a table. */
+ /**
+ * enum which controls the ordering of the columns in a table.
+ * @usage _intermediate_class_
+ */
public enum ColumnOrder {
/** columns are ordered based on the order of the data in the table (this
order does not change as columns are added to the table). */
@@ -217,13 +227,11 @@ public class Table
}
readTableDefinition(tableBuffer);
tableBuffer = null;
-
- // setup common cursor
- _cursor = Cursor.createCursor(this);
}
/**
* @return The name of the table
+ * @usage _general_method_
*/
public String getName() {
return _name;
@@ -231,31 +239,50 @@ public class Table
/**
* Whether or not this table has been marked as hidden.
+ * @usage _general_method_
*/
public boolean isHidden() {
return((_flags & Database.HIDDEN_OBJECT_FLAG) != 0);
}
+ /**
+ * @usage _advanced_method_
+ */
public boolean doUseBigIndex() {
return _useBigIndex;
}
-
+
+ /**
+ * @usage _advanced_method_
+ */
public int getMaxColumnCount() {
return _maxColumnCount;
}
+ /**
+ * @usage _general_method_
+ */
public int getColumnCount() {
return _columns.size();
}
+ /**
+ * @usage _general_method_
+ */
public Database getDatabase() {
return _database;
}
+ /**
+ * @usage _advanced_method_
+ */
public JetFormat getFormat() {
return getDatabase().getFormat();
}
+ /**
+ * @usage _advanced_method_
+ */
public PageChannel getPageChannel() {
return getDatabase().getPageChannel();
}
@@ -264,6 +291,7 @@ public class Table
* Gets the currently configured ErrorHandler (always non-{@code null}).
* This will be used to handle all errors unless overridden at the Cursor
* level.
+ * @usage _intermediate_method_
*/
public ErrorHandler getErrorHandler() {
return((_tableErrorHandler != null) ? _tableErrorHandler :
@@ -273,6 +301,7 @@ public class Table
/**
* Sets a new ErrorHandler. If {@code null}, resets to using the
* ErrorHandler configured at the Database level.
+ * @usage _intermediate_method_
*/
public void setErrorHandler(ErrorHandler newErrorHandler) {
_tableErrorHandler = newErrorHandler;
@@ -282,6 +311,9 @@ public class Table
return _tableDefPageNumber;
}
+ /**
+ * @usage _advanced_method_
+ */
public RowState createRowState() {
return new RowState(TempBufferHolder.Type.HARD);
}
@@ -300,6 +332,7 @@ public class Table
* int approxTableBytes = (table.getApproximateOwnedPageCount() *
* table.getFormat().PAGE_SIZE);
* </code>
+ * @usage _intermediate_method_
*/
public int getApproximateOwnedPageCount() {
// add a page for the table def (although that might actually be more than
@@ -319,6 +352,7 @@ public class Table
/**
* @return All of the columns in this table (unmodifiable List)
+ * @usage _general_method_
*/
public List<Column> getColumns() {
return Collections.unmodifiableList(_columns);
@@ -326,6 +360,7 @@ public class Table
/**
* @return the column with the given name
+ * @usage _general_method_
*/
public Column getColumn(String name) {
for(Column column : _columns) {
@@ -362,6 +397,7 @@ public class Table
/**
* @return the properties for this table
+ * @usage _general_method_
*/
public PropertyMap getProperties() throws IOException {
if(_props == null) {
@@ -372,6 +408,7 @@ public class Table
/**
* @return all PropertyMaps for this table (and columns)
+ * @usage _general_method_
*/
protected PropertyMaps getPropertyMaps() throws IOException {
if(_propertyMaps == null) {
@@ -383,6 +420,7 @@ public class Table
/**
* @return All of the Indexes on this table (unmodifiable List)
+ * @usage _intermediate_method_
*/
public List<Index> getIndexes() {
return Collections.unmodifiableList(_indexes);
@@ -391,6 +429,7 @@ public class Table
/**
* @return the index with the given name
* @throws IllegalArgumentException if there is no index with the given name
+ * @usage _intermediate_method_
*/
public Index getIndex(String name) {
for(Index index : _indexes) {
@@ -406,6 +445,7 @@ public class Table
* @return the primary key index for this table
* @throws IllegalArgumentException if there is no primary key index on this
* table
+ * @usage _intermediate_method_
*/
public Index getPrimaryKeyIndex() {
for(Index index : _indexes) {
@@ -421,6 +461,7 @@ public class Table
* @return the foreign key index joining this table to the given other table
* @throws IllegalArgumentException if there is no relationship between this
* table and the given table
+ * @usage _intermediate_method_
*/
public Index getForeignKeyIndex(Table otherTable) {
for(Index index : _indexes) {
@@ -449,19 +490,28 @@ public class Table
return _logicalIndexCount;
}
+ private Cursor getInternalCursor() {
+ if(_cursor == null) {
+ _cursor = Cursor.createCursor(this);
+ }
+ return _cursor;
+ }
+
/**
* After calling this method, getNextRow will return the first row in the
- * table
+ * table, see {@link Cursor#reset}.
+ * @usage _general_method_
*/
public void reset() {
- _cursor.reset();
+ getInternalCursor().reset();
}
/**
* Delete the current row (retrieved by a call to {@link #getNextRow()}).
+ * @usage _general_method_
*/
public void deleteCurrentRow() throws IOException {
- _cursor.deleteCurrentRow();
+ getInternalCursor().deleteCurrentRow();
}
/**
@@ -470,6 +520,7 @@ public class Table
* Note, this method is not generally meant to be used directly. You should
* use the {@link #deleteCurrentRow} method or use the Cursor class, which
* allows for more complex table interactions.
+ * @usage _advanced_method_
*/
public void deleteRow(RowState rowState, RowId rowId) throws IOException {
requireValidRowId(rowId);
@@ -504,6 +555,7 @@ public class Table
/**
* @return The next row in this table (Column name -> Column value)
+ * @usage _general_method_
*/
public Map<String, Object> getNextRow() throws IOException {
return getNextRow(null);
@@ -512,11 +564,12 @@ public class Table
/**
* @param columnNames Only column names in this collection will be returned
* @return The next row in this table (Column name -> Column value)
+ * @usage _general_method_
*/
public Map<String, Object> getNextRow(Collection<String> columnNames)
throws IOException
{
- return _cursor.getNextRow(columnNames);
+ return getInternalCursor().getNextRow(columnNames);
}
/**
@@ -525,6 +578,7 @@ public class Table
* Note, this method is not generally meant to be used directly. Instead
* use the Cursor class, which allows for more complex table interactions,
* e.g. {@link Cursor#getCurrentRowValue}.
+ * @usage _advanced_method_
*/
public Object getRowValue(RowState rowState, RowId rowId, Column column)
throws IOException
@@ -546,6 +600,7 @@ public class Table
/**
* Reads some columns from the given row.
* @param columnNames Only column names in this collection will be returned
+ * @usage _advanced_method_
*/
public Map<String, Object> getRow(
RowState rowState, RowId rowId, Collection<String> columnNames)
@@ -746,9 +801,9 @@ public class Table
* determined, but overflow row pointers are not followed.
*
* @return a ByteBuffer of the relevant page, or null if row was invalid
+ * @usage _advanced_method_
*/
- public static ByteBuffer positionAtRowHeader(RowState rowState,
- RowId rowId)
+ public static ByteBuffer positionAtRowHeader(RowState rowState, RowId rowId)
throws IOException
{
ByteBuffer rowBuffer = rowState.setHeaderRow(rowId);
@@ -790,9 +845,9 @@ public class Table
*
* @return a ByteBuffer narrowed to the actual row data, or null if row was
* invalid or deleted
+ * @usage _advanced_method_
*/
- public static ByteBuffer positionAtRowData(RowState rowState,
- RowId rowId)
+ public static ByteBuffer positionAtRowData(RowState rowState, RowId rowId)
throws IOException
{
positionAtRowHeader(rowState, rowId);
@@ -858,6 +913,7 @@ public class Table
* <code>getNextRow</code>.
* @throws IllegalStateException if an IOException is thrown by one of the
* operations, the actual exception will be contained within
+ * @usage _general_method_
*/
public Iterator<Map<String, Object>> iterator()
{
@@ -871,17 +927,19 @@ public class Table
* restrictions as a call to <code>getNextRow</code>.
* @throws IllegalStateException if an IOException is thrown by one of the
* operations, the actual exception will be contained within
+ * @usage _general_method_
*/
public Iterator<Map<String, Object>> iterator(Collection<String> columnNames)
{
reset();
- return _cursor.iterator(columnNames);
+ return getInternalCursor().iterator(columnNames);
}
/**
* Writes a new table defined by the given columns and indexes to the
* database.
* @return the first page of the new table's definition
+ * @usage _advanced_method_
*/
public static int writeTableDefinition(
List<Column> columns, List<IndexBuilder> indexes,
@@ -1280,6 +1338,7 @@ public class Table
/**
* Converts a map of columnName -> columnValue to an array of row values
* appropriate for a call to {@link #addRow(Object...)}.
+ * @usage _general_method_
*/
public Object[] asRow(Map<String,Object> rowMap) {
return asRow(rowMap, null);
@@ -1288,6 +1347,7 @@ public class Table
/**
* Converts a map of columnName -> columnValue to an array of row values
* appropriate for a call to {@link #updateCurrentRow(Object...)}.
+ * @usage _general_method_
*/
public Object[] asUpdateRow(Map<String,Object> rowMap) {
return asRow(rowMap, Column.KEEP_VALUE);
@@ -1322,6 +1382,7 @@ public class Table
* @param row row values for a single row. the row will be modified if
* this table contains an auto-number column, otherwise it
* will not be modified.
+ * @usage _general_method_
*/
public void addRow(Object... row) throws IOException {
addRows(Collections.singletonList(row), _singleRowBufferH);
@@ -1338,6 +1399,7 @@ public class Table
* @param rows List of Object[] row values. the rows will be modified if
* this table contains an auto-number column, otherwise they
* will not be modified.
+ * @usage _general_method_
*/
public void addRows(List<? extends Object[]> rows) throws IOException {
addRows(rows, _multiRowBufferH);
@@ -1419,9 +1481,10 @@ public class Table
* will be maintained, unchanged.
*
* @param row new row values for the current row.
+ * @usage _general_method_
*/
public void updateCurrentRow(Object... row) throws IOException {
- _cursor.updateCurrentRow(row);
+ getInternalCursor().updateCurrentRow(row);
}
/**
@@ -1431,6 +1494,7 @@ public class Table
* use the {@link #updateCurrentRow} method or use the Cursor class, which
* allows for more complex table interactions, e.g.
* {@link Cursor#setCurrentRowValue} and {@link Cursor#updateCurrentRow}.
+ * @usage _advanced_method_
*/
public void updateRow(RowState rowState, RowId rowId, Object... row)
throws IOException
@@ -1793,7 +1857,8 @@ public class Table
return buffer;
}
- private void padRowBuffer(ByteBuffer buffer, int minRowSize, int trailerSize)
+ private static void padRowBuffer(ByteBuffer buffer, int minRowSize,
+ int trailerSize)
{
int pos = buffer.position();
if((pos + trailerSize) < minRowSize) {
@@ -1804,6 +1869,9 @@ public class Table
}
}
+ /**
+ * @usage _general_method_
+ */
public int getRowCount() {
return _rowCount;
}
@@ -1821,8 +1889,9 @@ public class Table
@Override
public String toString() {
StringBuilder rtn = new StringBuilder();
- rtn.append("Type: " + _tableType);
- rtn.append("\nName: " + _name);
+ rtn.append("Type: " + _tableType +
+ ((_tableType == TYPE_USER) ? " (USER)" : " (SYSTEM)"));
+ rtn.append("\nName: " + _name);
rtn.append("\nRow count: " + _rowCount);
rtn.append("\nColumn count: " + _columns.size());
rtn.append("\nIndex (data) count: " + _indexCount);
@@ -1840,7 +1909,9 @@ public class Table
}
/**
- * @return A simple String representation of the entire table in tab-delimited format
+ * @return A simple String representation of the entire table in
+ * tab-delimited format
+ * @usage _general_method_
*/
public String display() throws IOException {
return display(Long.MAX_VALUE);
@@ -1848,7 +1919,9 @@ public class Table
/**
* @param limit Maximum number of rows to display
- * @return A simple String representation of the entire table in tab-delimited format
+ * @return A simple String representation of the entire table in
+ * tab-delimited format
+ * @usage _general_method_
*/
public String display(long limit) throws IOException {
reset();
@@ -1891,6 +1964,7 @@ public class Table
* Updates free space and row info for a new row of the given size in the
* given data page. Positions the page for writing the row data.
* @return the row number of the new row
+ * @usage _advanced_method_
*/
public static int addDataPageRow(ByteBuffer dataPage,
int rowSize,
@@ -1959,18 +2033,30 @@ public class Table
}
}
+ /**
+ * @usage _advanced_method_
+ */
public static boolean isDeletedRow(short rowStart) {
return ((rowStart & DELETED_ROW_MASK) != 0);
}
+ /**
+ * @usage _advanced_method_
+ */
public static boolean isOverflowRow(short rowStart) {
return ((rowStart & OVERFLOW_ROW_MASK) != 0);
}
+ /**
+ * @usage _advanced_method_
+ */
public static short cleanRowStart(short rowStart) {
return (short)(rowStart & OFFSET_MASK);
}
+ /**
+ * @usage _advanced_method_
+ */
public static short findRowStart(ByteBuffer buffer, int rowNum,
JetFormat format)
{
@@ -1978,11 +2064,17 @@ public class Table
buffer.getShort(getRowStartOffset(rowNum, format)));
}
+ /**
+ * @usage _advanced_method_
+ */
public static int getRowStartOffset(int rowNum, JetFormat format)
{
return format.OFFSET_ROW_START + (format.SIZE_ROW_LOCATION * rowNum);
}
+ /**
+ * @usage _advanced_method_
+ */
public static short findRowEnd(ByteBuffer buffer, int rowNum,
JetFormat format)
{
@@ -1992,11 +2084,17 @@ public class Table
buffer.getShort(getRowEndOffset(rowNum, format))));
}
+ /**
+ * @usage _advanced_method_
+ */
public static int getRowEndOffset(int rowNum, JetFormat format)
{
return format.OFFSET_ROW_START + (format.SIZE_ROW_LOCATION * (rowNum - 1));
}
+ /**
+ * @usage _advanced_method_
+ */
public static int getRowSpaceUsage(int rowSize, JetFormat format)
{
return rowSize + format.SIZE_ROW_LOCATION;
@@ -2004,6 +2102,7 @@ public class Table
/**
* @return the "AutoNumber" columns in the given collection of columns.
+ * @usage _advanced_method_
*/
public static List<Column> getAutoNumberColumns(Collection<Column> columns) {
List<Column> autoCols = new ArrayList<Column>();
@@ -2018,6 +2117,7 @@ public class Table
/**
* Returns {@code true} if a row of the given size will fit on the given
* data page, {@code false} otherwise.
+ * @usage _advanced_method_
*/
public static boolean rowFitsOnDataPage(
int rowLength, ByteBuffer dataPage, JetFormat format)
@@ -2052,6 +2152,7 @@ public class Table
/**
* Maintains the state of reading a row of data.
+ * @usage _advanced_class_
*/
public final class RowState
{
diff --git a/src/site/javadoc/stylesheet.css b/src/site/javadoc/stylesheet.css
new file mode 100644
index 0000000..ca1bb5e
--- /dev/null
+++ b/src/site/javadoc/stylesheet.css
@@ -0,0 +1,72 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+/* Javadoc style sheet */
+
+/* Define colors, fonts and other style attributes here to override the defaults */
+
+/* Page background color */
+body { background-color: #FFFFFF }
+
+a:link, a:visited {
+ color: blue;
+ }
+
+a:active, a:hover, #leftcol a:active, #leftcol a:hover {
+ color: #f30 !important;
+ }
+
+a:link.selfref, a:visited.selfref {
+ color: #555 !important;
+ }
+
+.a td {
+ background: #ddd;
+ color: #000;
+ }
+
+/* Table colors */
+.TableHeadingColor { background: #036; color:#FFFFFF } /* Dark blue */
+.TableSubHeadingColor { background: #bbb; color:#fff } /* Dark grey */
+.TableRowColor { background: #efefef } /* White */
+
+/* Font used in left-hand frame lists */
+.FrameTitleFont { font-size: medium; font-family: normal; color:#000000 }
+.FrameHeadingFont { font-size: medium; font-family: normal; color:#000000 }
+.FrameItemFont { font-size: medium; font-family: normal; color:#000000 }
+
+/* Example of smaller, sans-serif font in frames */
+/* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
+
+/* Navigation bar fonts and colors */
+.NavBarCell1 { background-color:#ddd;}/* Light mauve */
+.NavBarCell1Rev { background-color:#888;}/* Dark Blue */
+.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
+.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
+
+.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+
+/* usage tag classes */
+.UsageGeneralHeader { background: #efefef; color:#008000; text-decoration:underline }
+.UsageIntermediateHeader { background: #efefef; color:#D4CF01; text-decoration:underline }
+.UsageAdvancedHeader { background: #efefef; color:#D48201; text-decoration:underline }
+.UsageGeneral { background: #efefef }
+.UsageIntermediate { background: #efefef }
+.UsageAdvanced { background: #efefef }
diff --git a/src/site/javadoc/taglets.properties b/src/site/javadoc/taglets.properties
new file mode 100644
index 0000000..b24a1e3
--- /dev/null
+++ b/src/site/javadoc/taglets.properties
@@ -0,0 +1,41 @@
+# basic taglets config
+Taglets.splash=false
+Taglets.verbose=false
+Taglets.debug=false
+Taglets.drivers= drivers/j2se15.jar, drivers/j2se14.jar
+
+# custom usage formatting
+Taglets.shutdown.usage-tag= net.sourceforge.taglets.simple.shutdown.RegexReplacer
+Taglets.shutdown.usage-tag.files= **/*.html
+Taglets.shutdown.usage-tag.token.0=_general_method_
+Taglets.shutdown.usage-tag.value.0=<span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This method is general use.</span>
+
+Taglets.shutdown.usage-tag.token.1=_intermediate_method_
+Taglets.shutdown.usage-tag.value.1=<span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This method requires moderate API knowledge.</span>
+
+Taglets.shutdown.usage-tag.token.2=_advanced_method_
+Taglets.shutdown.usage-tag.value.2=<span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This method is for advanced/internal use.</span>
+
+Taglets.shutdown.usage-tag.token.3=_general_class_
+Taglets.shutdown.usage-tag.value.3=<span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This class is general use.</span>
+
+Taglets.shutdown.usage-tag.token.4=_intermediate_class_
+Taglets.shutdown.usage-tag.value.4=<span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This class requires moderate API knowledge.</span>
+
+Taglets.shutdown.usage-tag.token.5=_advanced_class_
+Taglets.shutdown.usage-tag.value.5=<span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This class is for advanced/internal use.</span>
+
+Taglets.shutdown.usage-tag.token.6=_general_field_
+Taglets.shutdown.usage-tag.value.6=<span class="UsageGeneral"><span class="UsageGeneralHeader">General</span>: This field is general use.</span>
+
+Taglets.shutdown.usage-tag.token.7=_intermediate_field_
+Taglets.shutdown.usage-tag.value.7=<span class="UsageIntermediate"><span class="UsageIntermediateHeader">Intermediate</span>: This field requires moderate API knowledge.</span>
+
+Taglets.shutdown.usage-tag.token.8=_advanced_field_
+Taglets.shutdown.usage-tag.value.8=<span class="UsageAdvanced"><span class="UsageAdvancedHeader">Advanced</span>: This field is for advanced/internal use.</span>
+
+
+# apparently we need one "normal" tag or the taglets code gets unhappy
+Taglets.taglet.todo= net.sourceforge.taglets.simple.block.ParamBlockTaglet
+Taglets.taglet.todo.dl.class= tagletsTodo
+Taglets.taglet.todo.dl.header= <b>Todo:</b>