*/
public static final byte AUTO_NUMBER_GUID_FLAG_MASK = (byte)0x40;
+ /**
+ * mask for the hyperlink bit (on memo types)
+ * @usage _advanced_field_
+ */
+ public static final byte HYPERLINK_FLAG_MASK = (byte)0x80;
+
/**
* mask for the unknown bit (possible "can be null"?)
* @usage _advanced_field_
_textInfo._compressedUnicode = ((buffer.get(offset +
getFormat().OFFSET_COLUMN_COMPRESSED_UNICODE) & 1) == 1);
+
+ if(_type == DataType.MEMO) {
+ // only memo fields can be hyperlinks
+ _textInfo._hyperlink = ((flags & HYPERLINK_FLAG_MASK) != 0);
+ }
}
setAutoNumberGenerator();
modifyTextInfo();
_textInfo._versionHistoryCol = versionHistoryCol;
}
+
+ /**
+ * Returns whether or not this is a hyperlink column (only possible for
+ * columns of type MEMO).
+ * @usage _general_method_
+ */
+ public boolean isHyperlink() {
+ return _textInfo._hyperlink;
+ }
+
+ /**
+ * @usage _general_method_
+ */
+ public void setHyperlink(boolean hyperlink) {
+ modifyTextInfo();
+ _textInfo._hyperlink = hyperlink;
+ }
/**
* Returns extended functionality for "complex" columns.
"Only textual columns allow unicode compression (text/memo)");
}
}
+
+ if(isHyperlink()) {
+ if(getType() != DataType.MEMO) {
+ throw new IllegalArgumentException(
+ "Only memo columns can be hyperlinks");
+ }
+ }
}
public Object setRowValue(Object[] rowArray, Object value) {
* Constructs a byte containing the flags for this column.
*/
private byte getColumnBitFlags() {
- byte flags = Column.UNKNOWN_FLAG_MASK;
+ byte flags = UNKNOWN_FLAG_MASK;
if(!isVariableLength()) {
- flags |= Column.FIXED_LEN_FLAG_MASK;
+ flags |= FIXED_LEN_FLAG_MASK;
}
if(isAutoNumber()) {
flags |= getAutoNumberGenerator().getColumnFlags();
}
+ if(isHyperlink()) {
+ flags |= HYPERLINK_FLAG_MASK;
+ }
return flags;
}
if(isAppendOnly()) {
rtn.append("\n\tAppend only: " + isAppendOnly());
}
+ if(isHyperlink()) {
+ rtn.append("\n\tHyperlink: " + isHyperlink());
+ }
}
if(_autoNumber) {
rtn.append("\n\tLast AutoNumber: " + _autoNumberGenerator.getLast());
// we specifically put the "long variable" values after the normal
// variable length values so that we have a better chance of fitting it
// all (because "long variable" values can go in separate pages)
- short longVariableOffset =
- Column.countNonLongVariableLength(columns);
+ short longVariableOffset = countNonLongVariableLength(columns);
for (Column col : columns) {
// record this for later use when writing indexes
col.setColumnNumber(columnNumber);
/** complex column which tracks the version history for this "append only"
column */
private Column _versionHistoryCol;
+ /** whether or not this is a hyperlink column (only possible for columns
+ of type MEMO) */
+ private boolean _hyperlink;
}
}