Tabnine Logo
SQLiteStatement.bindLong
Code IndexAdd Tabnine to your IDE (free)

How to use
bindLong
method
in
android.database.sqlite.SQLiteStatement

Best Java code snippets using android.database.sqlite.SQLiteStatement.bindLong (Showing top 20 results out of 792)

origin: greenrobot/greenDAO

@Override
public void bindLong(int index, long value) {
  delegate.bindLong(index, value);
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, DateEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  java.util.Date date = entity.getDate();
  if (date != null) {
    stmt.bindLong(2, date.getTime());
  }
  stmt.bindLong(3, entity.getDateNotNull().getTime());
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, TreeEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  Long parentId = entity.getParentId();
  if (parentId != null) {
    stmt.bindLong(2, parentId);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, RelationSource2 entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  Long toOneId = entity.getToOneId();
  if (toOneId != null) {
    stmt.bindLong(2, toOneId);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, ToManyTarget2 entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  Long fkId = entity.getFkId();
  if (fkId != null) {
    stmt.bindLong(2, fkId);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, JoinManyToDateEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  Long idToMany = entity.getIdToMany();
  if (idToMany != null) {
    stmt.bindLong(2, idToMany);
  }
  Long idDate = entity.getIdDate();
  if (idDate != null) {
    stmt.bindLong(3, idDate);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, AutoincrementEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, CustomTypeEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  MyTimestamp myCustomTimestamp = entity.getMyCustomTimestamp();
  if (myCustomTimestamp != null) {
    stmt.bindLong(2, myCustomTimestampConverter.convertToDatabaseValue(myCustomTimestamp));
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, KeepEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, ToOneTarget2 entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
}
origin: stackoverflow.com

 String sql = "INSERT INTO table_name (column_1, column_2) VALUES (?, ?)";
SQLiteStatement statement = db.compileStatement(sql);

int intValue = 57;
String stringValue = "hello";

statement.bindLong(1, intValue); // These match to the two question marks in the sql string
statement.bindString(2, stringValue); 

long rowId = statement.executeInsert();
origin: stackoverflow.com

 String sql = "UPDATE table_name SET column_2=? WHERE column_1=?";
SQLiteStatement statement = db.compileStatement(sql);

int id = 7;
String stringValue = "hi there";

statement.bindString(1, stringValue);
statement.bindLong(2, id);

int numberOfRowsAffected = statement.executeUpdateDelete();
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, SimpleEntityNotNull entity) {
  stmt.clearBindings();
  stmt.bindLong(1, entity.getId());
  stmt.bindLong(2, entity.getSimpleBoolean() ? 1L: 0L);
  stmt.bindLong(3, entity.getSimpleByte());
  stmt.bindLong(4, entity.getSimpleShort());
  stmt.bindLong(5, entity.getSimpleInt());
  stmt.bindLong(6, entity.getSimpleLong());
  stmt.bindDouble(7, entity.getSimpleFloat());
  stmt.bindDouble(8, entity.getSimpleDouble());
  stmt.bindString(9, entity.getSimpleString());
  stmt.bindBlob(10, entity.getSimpleByteArray());
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, ToManyTargetEntity entity) {
  stmt.clearBindings();
  Long toManyId = entity.getToManyId();
  if (toManyId != null) {
    stmt.bindLong(1, toManyId);
  }
  Long toManyIdDesc = entity.getToManyIdDesc();
  if (toManyIdDesc != null) {
    stmt.bindLong(2, toManyIdDesc);
  }
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(3, id);
  }
  String targetJoinProperty = entity.getTargetJoinProperty();
  if (targetJoinProperty != null) {
    stmt.bindString(4, targetJoinProperty);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, ExtendsImplementsEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  String text = entity.getText();
  if (text != null) {
    stmt.bindString(2, text);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, ToManyEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  String sourceJoinProperty = entity.getSourceJoinProperty();
  if (sourceJoinProperty != null) {
    stmt.bindString(2, sourceJoinProperty);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, IndexedStringEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  String indexedString = entity.getIndexedString();
  if (indexedString != null) {
    stmt.bindString(2, indexedString);
  }
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, AnActiveEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
  String text = entity.getText();
  if (text != null) {
    stmt.bindString(2, text);
  }
}
origin: greenrobot/greenDAO

protected void updateInsideSynchronized(T entity, SQLiteStatement stmt, boolean lock) {
  // To do? Check if it's worth not to bind PKs here (performance).
  bindValues(stmt, entity);
  int index = config.allColumns.length + 1;
  K key = getKey(entity);
  if (key instanceof Long) {
    stmt.bindLong(index, (Long) key);
  } else if (key == null) {
    throw new DaoException("Cannot update entity without key - was it inserted before?");
  } else {
    stmt.bindString(index, key.toString());
  }
  stmt.execute();
  attachEntity(key, entity, lock);
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, MinimalEntity entity) {
  stmt.clearBindings();
  Long id = entity.getId();
  if (id != null) {
    stmt.bindLong(1, id);
  }
}
android.database.sqliteSQLiteStatementbindLong

Popular methods of SQLiteStatement

  • bindString
  • clearBindings
  • executeInsert
  • close
  • execute
  • bindDouble
  • bindBlob
  • executeUpdateDelete
  • simpleQueryForLong
  • bindNull
  • simpleQueryForString
  • bindAllArgsAsStrings
  • simpleQueryForString,
  • bindAllArgsAsStrings,
  • bindDate,
  • bindInt,
  • bindInteger,
  • bindValue,
  • simpleQueryForBlobFileDescriptor,
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Best plugins for Eclipse
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