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

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

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

origin: apache/tika

private boolean isRichText(Column c) throws IOException {
  if (c == null) {
    return false;
  }
  PropertyMap m = c.getProperties();
  if (m == null) {
    return false;
  }
  if (c.getType() == null || ! c.getType().equals(DataType.MEMO)) {
    return false;
  }
  Object b = m.getValue(TEXT_FORMAT_KEY);
  if (b instanceof Byte) {
    if (((Byte)b).byteValue() == RICH_TEXT_FORMAT) {
      return true;
    }
  }
  return false;
}
origin: net.sf.ucanaccess/ucanaccess

private boolean typeGroup(DataType dt, DataType... gr) {
  for (DataType el : gr) {
    if (el.equals(dt)) {
      return true;
    }
  }
  return false;
}
origin: apache/tika

if (c.getType().equals(DataType.OLE)) {
  handleOLE(r, c.getName(), handler);
} else if (c.getType().equals(DataType.BINARY)) {
  Object obj = r.get(c.getName());
  if (obj != null) {
origin: net.sf.ucanaccess/ucanaccess

private String defaultValue4SQL(Object defaulT, DataType dt) throws SQLException, IOException {
  if (defaulT == null) {
    return null;
  }
  String default4SQL = SQLConverter.convertSQL(" " + defaulT.toString()).getSql();
  if (default4SQL.trim().startsWith("=")) {
    default4SQL = default4SQL.trim().substring(1);
  }
  if (dt.equals(DataType.BOOLEAN)
      && ("=yes".equalsIgnoreCase(default4SQL) || "yes".equalsIgnoreCase(default4SQL))) {
    default4SQL = "true";
  }
  if (dt.equals(DataType.BOOLEAN)
      && ("=no".equalsIgnoreCase(default4SQL) || "no".equalsIgnoreCase(default4SQL))) {
    default4SQL = "false";
  }
  if ((dt.equals(DataType.MEMO) || dt.equals(DataType.TEXT))
      && (!defaulT.toString().startsWith("\"") || !defaulT.toString().endsWith("\""))
  ) {
    default4SQL = "'" + default4SQL.replaceAll("'", "''") + "'";
  }
  return default4SQL;
}
origin: net.sf.ucanaccess/ucanaccess

@FunctionType(functionName = "formulaToNumeric", argumentTypes = { AccessType.MEMO,
    AccessType.MEMO }, returnType = AccessType.DOUBLE)
public static Double formulaToNumeric(String res, String datatype) {
  if (res == null) {
    return null;
  }
  try {
    DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance();
    String sep = dfs.getDecimalSeparator() + "";
    String gs = dfs.getGroupingSeparator() + "";
    res = res.replaceAll(Pattern.quote(gs), "");
    if (!sep.equalsIgnoreCase(".")) {
      res = res.replaceAll(Pattern.quote(sep), ".");
    }
    double d = val(res);
    DataType dt = DataType.valueOf(datatype);
    if (dt.equals(DataType.BYTE) || dt.equals(DataType.INT) || dt.equals(DataType.LONG)) {
      d = Math.rint(d + APPROX);
    }
    return d;
  } catch (Exception e) {
    return null;
  }
}
origin: net.sf.ucanaccess/ucanaccess

private static boolean hasAutoNumberColumn(Table t) {
  List<? extends Column> lc = t.getColumns();
  for (Column cl : lc) {
    if (cl.isAutoNumber() || DataType.BOOLEAN.equals(cl.getType())) {
      return true;
    }
  }
  return false;
}
origin: org.apache.tika/tika-parsers

private boolean isRichText(Column c) throws IOException {
  if (c == null) {
    return false;
  }
  PropertyMap m = c.getProperties();
  if (m == null) {
    return false;
  }
  if (c.getType() == null || ! c.getType().equals(DataType.MEMO)) {
    return false;
  }
  Object b = m.getValue(TEXT_FORMAT_KEY);
  if (b instanceof Byte) {
    if (((Byte)b).byteValue() == RICH_TEXT_FORMAT) {
      return true;
    }
  }
  return false;
}
origin: com.github.lafa.tikaNoExternal/tika-parsers

private boolean isRichText(Column c) throws IOException {
  if (c == null) {
    return false;
  }
  PropertyMap m = c.getProperties();
  if (m == null) {
    return false;
  }
  if (c.getType() == null || ! c.getType().equals(DataType.MEMO)) {
    return false;
  }
  Object b = m.getValue(TEXT_FORMAT_KEY);
  if (b instanceof Byte) {
    if (((Byte)b).byteValue() == RICH_TEXT_FORMAT) {
      return true;
    }
  }
  return false;
}
origin: net.sf.ucanaccess/ucanaccess

public BlobAction(Table _table, Object[] newValues) throws SQLException {
  this.table = _table;
  if (!BlobKey.hasPrimaryKey(_table)) {
    return;
  }
  Index pk = _table.getPrimaryKeyIndex();
  HashSet<String> hsKey = new HashSet<String>();
  for (Index.Column icl : pk.getColumns()) {
    hsKey.add(icl.getName());
  }
  HashSet<String> hsBlob = new HashSet<String>();
  int i = 0;
  HashMap<String, Object> keyMap = new HashMap<String, Object>();
  for (Column cl : _table.getColumns()) {
    if (cl.getType().equals(DataType.OLE) && newValues[i] != null) {
      containsBlob = true;
      hsBlob.add(cl.getName());
    }
    if (hsKey.contains(cl.getName())) {
      keyMap.put(cl.getName(), newValues[i]);
    }
    ++i;
  }
  for (String cln : hsBlob) {
    keys.add(new BlobKey(keyMap, table.getName(), cln));
  }
}
origin: net.sf.ucanaccess/ucanaccess

Column cl = idx.getColumns().get(0).getColumn();
DataType dt = cl.getType();
if (dt.equals(DataType.COMPLEX_TYPE)) {
  return;
    if (cd.getColumn().getType().equals(DataType.COMPLEX_TYPE)) {
      return;
origin: net.sf.ucanaccess/ucanaccess

private String getHsqldbColumnType(Column cl) throws IOException {
  String htype;
  DataType dtyp = cl.getType();
  DataType rtyp = getReturnType(cl);
  boolean calcType = false;
  if (rtyp != null) {
    dtyp = rtyp;
    calcType = true;
  }
  if (dtyp.equals(DataType.TEXT)) {
    int ln = ff1997 ? cl.getLength() : cl.getLengthInUnits();
    htype = "VARCHAR(" + ln + ")";
  } else if (dtyp.equals(DataType.NUMERIC) && (cl.getScale() > 0 || calcType)) {
    if (calcType) {
      htype = "NUMERIC(100 ,4)";
    } else {
      htype = "NUMERIC(" + (cl.getPrecision() > 0 ? cl.getPrecision() : 100) + "," + cl.getScale() + ")";
    }
  } else if (dtyp.equals(DataType.FLOAT) && calcType) {
    htype = "NUMERIC(" + (cl.getPrecision() > 0 ? cl.getPrecision() : 100) + "," + 4 + ")";
  } else {
    htype = TypesMap.map2hsqldb(dtyp);
  }
  return htype;
}
origin: net.sf.ucanaccess/ucanaccess

  if (column.getType().equals(DataType.SHORT_DATE_TIME)) {
    TimestampData ts = (TimestampData) value;
    TimeZone zone = TimeZone.getDefault();
if (column.getType().equals(DataType.BYTE)) {
  int vl = (Integer) value;
  if (vl < 0 || vl > 256) {
origin: net.sf.ucanaccess/ucanaccess

for (Column cli : t.getColumns()) {
  ColumnImpl cl = (ColumnImpl) cli;
  if (cli.getType().equals(DataType.COMPLEX_TYPE) && (newR[i] == null || "".equals(newR[i]))) {
    if (cli.getComplexInfo().getType().equals(ComplexDataType.ATTACHMENT)) {
      newR[i] = new JavaObjectData(new Attachment[0]);
        if (cl.getAutoNumberGenerator().getType().equals(DataType.LONG) && newR[i] != null) {
          AutoNumberManager.bump(cl, (Integer) newR[i]);
        if (cl.getAutoNumberGenerator().getType().equals(DataType.GUID)) {
        } else if (cl.getAutoNumberGenerator().getType().equals(DataType.LONG)) {
          int keyg = AutoNumberManager.getNext(cl);
          newR[i] = keyg;
        throw new RuntimeException("Cannot update autoincrement column");
    } else if (cl.getAutoNumberGenerator().getType().equals(DataType.GUID)) {
      validateGUID(newR[i]);
  } else if (DataType.BOOLEAN.equals(cl.getType())) {
    if (newR[i] == null) {
      newR[i] = false;
origin: net.sf.ucanaccess/ucanaccess

if (default4SQL != null || cl.getType().equals(DataType.BOOLEAN)) {
  try {
    defObj = default4SQL == null && cl.getType().equals(DataType.BOOLEAN) ? Boolean.FALSE : defObj;
    ps = conn.getHSQLDBConnection().prepareStatement(
        SQLConverter.convertSQL("UPDATE " + tableName + " SET " + columnName + "=" + "?").getSql());
origin: net.sf.ucanaccess/ucanaccess

if (length > 0 && dt.equals(DataType.TEXT)) {
  cb.setLengthInUnits(length);
origin: net.sf.ucanaccess/ucanaccess

ColumnImpl cli = (ColumnImpl) cl;
AutoNumberGenerator ang = cli.getAutoNumberGenerator();
if (ang.getType().equals(DataType.LONG)) {
  ctype = "COUNTER";
origin: com.github.lafa.tikaNoExternal/tika-parsers

if (c.getType().equals(DataType.OLE)) {
  handleOLE(r, c.getName(), handler);
} else if (c.getType().equals(DataType.BINARY)) {
  Object obj = r.get(c.getName());
  if (obj != null) {
origin: org.apache.tika/tika-parsers

if (c.getType().equals(DataType.OLE)) {
  handleOLE(r, c.getName(), handler);
} else if (c.getType().equals(DataType.BINARY)) {
  Object obj = r.get(c.getName());
  if (obj != null) {
origin: net.sf.ucanaccess/ucanaccess

ColumnImpl cl = (ColumnImpl) cli;
if (cl.isAutoNumber() && !memento[j].equals(newRow[j])
    && !cl.getAutoNumberGenerator().getType().equals(DataType.COMPLEX_TYPE)) {
  if (cl.getAutoNumberGenerator().getType().equals(DataType.LONG)) {
    AutoNumberManager.reset(cl, (Integer) newRow[j]);
com.healthmarketscience.jackcessDataTypeequals

Popular methods of DataType

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

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JList (javax.swing)
  • Top 12 Jupyter Notebook extensions
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