Tabnine Logo
DataType.getFixedSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getFixedSize
method
in
com.healthmarketscience.jackcess.DataType

Best Java code snippets using com.healthmarketscience.jackcess.DataType.getFixedSize (Showing top 14 results out of 315)

origin: pentaho/pentaho-kettle

 if ( length < 3 ) {
  column.setType( DataType.BYTE );
  length = DataType.BYTE.getFixedSize();
 } else {
  if ( length < 5 ) {
   column.setType( DataType.INT );
   length = DataType.INT.getFixedSize();
  } else {
   column.setType( DataType.LONG );
   length = DataType.LONG.getFixedSize();
case ValueMetaInterface.TYPE_NUMBER:
 column.setType( DataType.DOUBLE );
 length = DataType.DOUBLE.getFixedSize();
 break;
case ValueMetaInterface.TYPE_DATE:
 column.setType( DataType.SHORT_DATE_TIME );
 length = DataType.SHORT_DATE_TIME.getFixedSize();
 break;
case ValueMetaInterface.TYPE_STRING:
case ValueMetaInterface.TYPE_BOOLEAN:
 column.setType( DataType.BOOLEAN );
 length = DataType.BOOLEAN.getFixedSize();
 break;
case ValueMetaInterface.TYPE_BIGNUMBER:
 column.setType( DataType.NUMERIC );
 length = DataType.NUMERIC.getFixedSize();
 break;
origin: com.healthmarketscience.jackcess/jackcess

public int getFixedSize() {
 return getFixedSize(null);
}
origin: com.healthmarketscience.jackcess/jackcess

private static boolean isPseudoGuidColumn(
  DataType dataType, String propName, int dataSize, Object value)
 throws IOException
{
 // guids seem to be marked as "binary" fields
 return((dataType == DataType.BINARY) &&
     ((dataSize == DataType.GUID.getFixedSize()) ||
     ((dataSize == -1) && ColumnImpl.isGUIDValue(value))) &&
     PropertyMap.GUID_PROP.equalsIgnoreCase(propName));
}
origin: com.healthmarketscience.jackcess/jackcess

 @Override
 protected ByteBuffer writeRealData(Object obj, int remainingRowLength,
                   ByteOrder order)
  throws IOException
 {
  // we should only be working with fixed length types
  ByteBuffer buffer = writeFixedLengthField(
    obj, prepareWrappedCalcValue(getType().getFixedSize(), order));
  buffer.rewind();
  return buffer;
 }
}
origin: com.healthmarketscience.jackcess/jackcess

public short getLength() {
 return ((_length != null) ? _length :
     (short)(!_type.isVariableLength() ? _type.getFixedSize() :
         _type.getDefaultSize()));
}
origin: com.healthmarketscience.jackcess/jackcess

 public short getNextFixedOffset(ColumnBuilder col) {
  short offset = _fixedOffset;
  _fixedOffset += col.getType().getFixedSize(col.getLength());
  return offset;
 }
}
origin: com.healthmarketscience.jackcess/jackcess

/**
 * Serialize an Object into a raw byte value for this column
 * @param obj Object to serialize
 * @param order Order in which to serialize
 * @return A buffer containing the bytes
 * @usage _advanced_method_
 */
protected ByteBuffer writeFixedLengthField(Object obj, ByteOrder order)
 throws IOException
{
 int size = getType().getFixedSize(_columnLength);
 ByteBuffer buffer = writeFixedLengthField(
   obj, PageChannel.createBuffer(size, order));
 buffer.flip();
 return buffer;
}
origin: com.healthmarketscience.jackcess/jackcess

/**
 * @usage _advanced_method_
 */
protected ColumnImpl(TableImpl table, String name, DataType type,
           int colNumber, int fixedOffset, int varLenIndex) {
 _table = table;
 _name = name;
 _type = type;
 if(!_type.isVariableLength()) {
  _columnLength = (short)type.getFixedSize();
 } else {
  _columnLength = (short)type.getMaxSize();
 }
 _variableLength = type.isVariableLength();
 _autoNumber = false;
 _calculated = false;
 _autoNumberGenerator = null;
 _columnNumber = (short)colNumber;
 _columnIndex = colNumber;
 _displayIndex = colNumber;
 _fixedDataOffset = fixedOffset;
 _varLenTableIndex = varLenIndex;
}
origin: com.healthmarketscience.jackcess/jackcess

  decVal, getType().getFixedSize() - 1);
if(buffer.order() != ByteOrder.BIG_ENDIAN) {
 fixNumericByteOrder(intValBytes);
origin: com.healthmarketscience.jackcess/jackcess

  getType().getFixedSize(), order);
writeNumericValue(buffer, obj);
buffer.flip();
origin: net.sf.ucanaccess/ucanaccess

dt = TypesMap.map2Jackcess(AccessType.valueOf(types[seq].toUpperCase(Locale.US)));
cb.setType(dt);
cb.setLengthInUnits((short) dt.getFixedSize());
origin: com.healthmarketscience.jackcess/jackcess

colDataLen = column.getType().getFixedSize(column.getLength());
origin: com.healthmarketscience.jackcess/jackcess

 (col.getFixedDataOffset() >= fixedOffset)) {
fixedOffset = col.getFixedDataOffset() +
 col.getType().getFixedSize(col.getLength());
origin: com.healthmarketscience.jackcess/jackcess

if(getLength() < getType().getFixedSize()) {
 throw new IllegalArgumentException(withErrorContext(
   "Invalid fixed length size " + getLength()));
com.healthmarketscience.jackcessDataTypegetFixedSize

Popular methods of DataType

  • equals
  • name
  • fromByte
  • fromSQLType
  • getMaxSize
  • getSQLType
  • getUnitSize
  • isTextual
  • toString
  • fromUnitSize
  • getDefaultPrecision
  • getDefaultScale
  • getDefaultPrecision,
  • getDefaultScale,
  • getDefaultSize,
  • getHasScalePrecision,
  • getMaxPrecision,
  • getMaxScale,
  • getMinPrecision,
  • getMinScale,
  • getMinSize

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Collectors (java.util.stream)
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now