/** * @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<ColumnBuilder> columns) { short rtn = 0; for (ColumnBuilder col : columns) { if (col.isVariableLength()) { rtn++; } } return rtn; }
/** * @return The number of variable length columns which are not long values * found in the list * @usage _advanced_method_ */ public short countNonLongVariableLength() { short rtn = 0; for (ColumnBuilder col : _columns) { if (col.isVariableLength() && !col.getType().isLongValue()) { rtn++; } } return rtn; }
/** * Constructs a byte containing the flags for this column. */ private static byte getColumnBitFlags(ColumnBuilder col) { byte flags = UPDATABLE_FLAG_MASK; if(!col.isVariableLength()) { flags |= FIXED_LEN_FLAG_MASK; } if(col.isAutoNumber()) { byte autoNumFlags = 0; switch(col.getType()) { case LONG: case COMPLEX_TYPE: autoNumFlags = AUTO_NUMBER_FLAG_MASK; break; case GUID: autoNumFlags = AUTO_NUMBER_GUID_FLAG_MASK; break; default: // unknown autonum type } flags |= autoNumFlags; } if(col.isHyperlink()) { flags |= HYPERLINK_FLAG_MASK; } return flags; }
if(col.isVariableLength()) { buffer.putShort(colOffsets.getNextVariableOffset(col)); } else { if(col.isVariableLength()) { buffer.putShort((short) 0); } else {
boolean isVarCol = column.isVariableLength(); boolean isLongVal = column.getType().isLongValue(); if(column.isVariableLength()) {