Tabnine Logo
AttributesDao
Code IndexAdd Tabnine to your IDE (free)

How to use
AttributesDao
in
mil.nga.geopackage.attributes

Best Java code snippets using mil.nga.geopackage.attributes.AttributesDao (Showing top 15 results out of 315)

origin: ngageoint/geopackage-android

/**
 * {@inheritDoc}
 */
@Override
public AttributesRow newRow() {
  return new AttributesRow(getTable());
}
origin: ngageoint/geopackage-android

/**
 * {@inheritDoc}
 */
@Override
protected AttributesRow newRow() {
  return getDao().newRow();
}
origin: ngageoint/geopackage-android

TestCase.assertNotNull(dao.getDb());
TestCase.assertEquals(tableName, dao.getTableName());
AttributesTable attributesTable = dao.getTable();
String[] columns = attributesTable.getColumnNames();
AttributesCursor cursor = dao.queryForAll();
int count = cursor.getCount();
int manualCount = 0;
cursor = (AttributesCursor) dao.getDatabaseConnection().query(dao.getTableName(),
    null, null, null, null, null, null);
count = cursor.getCount();
    .queryForIdRow(attributesRow.getId());
TestCase.assertNotNull(queryAttributesRow);
TestCase.assertEquals(attributesRow.getId(),
  cursor = dao.queryForEq(column1.getName(),
      column1AttributesValue);
  TestCase.assertTrue(cursor.getCount() > 0);
  cursor = dao.queryForValueFieldValues(fieldValues);
  TestCase.assertTrue(cursor.getCount() > 0);
  found = false;
    AttributesRow queryRow = dao.queryForIdRow(rowId);
    TestCase.assertNotNull(queryRow);
    TestCase.assertNotNull(queryRow.getTable());
origin: ngageoint/geopackage-android

AttributesCursor cursor = dao.queryForAll();
int count = cursor.getCount();
if (count > 0) {
  long newRowId = dao.create(attributesRow);
  attributesRow = dao.queryForIdRow(id);
  TestCase.assertNotNull(attributesRow);
  AttributesRow queryAttributesRow = dao
      .queryForIdRow(newRowId);
  TestCase.assertNotNull(queryAttributesRow);
  cursor = dao.queryForAll();
  TestCase.assertEquals(count + 1, cursor.getCount());
  cursor.close();
  AttributesRow newRow = dao.newRow();
  for (AttributesColumn column : dao.getTable().getColumns()) {
  long newRowId2 = dao.create(newRow);
      .queryForIdRow(newRowId2);
  TestCase.assertNotNull(queryAttributesRow2);
  cursor = dao.queryForAll();
  TestCase.assertEquals(count + 2, cursor.getCount());
  cursor.close();
  for (AttributesColumn column : dao.getTable().getColumns()) {
    if (column.getDataType() == GeoPackageDataType.BLOB) {
      byte[] blob1 = (byte[]) queryAttributesRow2
origin: ngageoint/geopackage-android

AttributesCursor attributesCursor = attributesDao.queryForAll();
int attributesCount = attributesCursor.getCount();
List<Long> attributeIds = new ArrayList<>();
    .getBaseTableRelations(attributesDao.getTableName());
List<ExtendedRelation> attributesExtendedRelations2 = extendedRelationsDao
    .getTableRelations(attributesDao.getTableName());
TestCase.assertEquals(1, attributesExtendedRelations.size());
TestCase.assertEquals(1, attributesExtendedRelations2.size());
    attributesExtendedRelations2.get(0).getId());
TestCase.assertTrue(extendedRelationsDao.getRelatedTableRelations(
    attributesDao.getTableName()).isEmpty());
  TestCase.assertEquals(attributesDao.getTableName(),
      attributesRelation.getBaseTableName());
  TestCase.assertEquals(attributesDao.getTable().getPkColumn()
      .getName(), attributesRelation.getBasePrimaryColumn());
  TestCase.assertEquals(simpleDao.getTableName(),
  attributesCursor = attributesDao.queryForAll();
  int totalMapped = 0;
  while (attributesCursor.moveToNext()) {
  TestCase.assertEquals(attributesDao.getTableName(),
      simpleRelation.getBaseTableName());
  TestCase.assertEquals(attributesDao.getTable().getPkColumn()
      .getName(), simpleRelation.getBasePrimaryColumn());
  TestCase.assertEquals(simpleDao.getTableName(),
origin: ngageoint/geopackage-android

AttributesCursor cursor = dao.queryForAll();
int count = cursor.getCount();
if (count > 0) {
  for (AttributesColumn attributesColumn : dao.getTable()
      .getColumns()) {
    if (!attributesColumn.isPrimaryKey()) {
  TestCase.assertEquals(1, dao.update(attributesRow));
  AttributesRow readRow = dao.queryForIdRow(id);
  TestCase.assertNotNull(readRow);
  TestCase.assertEquals(originalRow.getId(), readRow.getId());
origin: ngageoint/geopackage-android

AttributesRow newRow = attributesDao.newRow();
newRow.setValue(DATETIME_COLUMN, new Date());
attributesDao.create(newRow);
origin: ngageoint/geopackage-android

AttributesDao relatedDao = geoPackage
    .getAttributesDao(extendedRelation.getRelatedTableName());
AttributesColumn pkColumn2 = relatedDao.getTable().getPkColumn();
AttributesCursor ars = relatedDao.queryForAll();
while (ars.moveToNext()) {
  long relatedId = ars.getLong(pkColumn2.getIndex());
origin: ngageoint/geopackage-android

TestCase.assertNotNull(dao);
AttributesCursor cursor = dao.queryForAll();
int count = cursor.getCount();
if (count > 0) {
  TestCase.assertEquals(1, dao.delete(attributesRow));
      .queryForIdRow(attributesRow.getId());
  TestCase.assertNull(queryAttributesRow);
  cursor = dao.queryForAll();
  TestCase.assertEquals(count - 1, cursor.getCount());
  cursor.close();
origin: ngageoint/geopackage-java

/**
 * {@inheritDoc}
 */
@Override
public AttributesDao getAttributesDao(Contents contents) {
  if (contents == null) {
    throw new GeoPackageException("Non null "
        + Contents.class.getSimpleName()
        + " is required to create "
        + AttributesDao.class.getSimpleName());
  }
  if (contents.getDataType() != ContentsDataType.ATTRIBUTES) {
    throw new GeoPackageException(Contents.class.getSimpleName()
        + " is required to be of type "
        + ContentsDataType.ATTRIBUTES + ". Actual: "
        + contents.getDataTypeString());
  }
  // Read the existing table and create the dao
  AttributesTableReader tableReader = new AttributesTableReader(
      contents.getTableName());
  AttributesConnection userDb = new AttributesConnection(database);
  final AttributesTable attributesTable = tableReader.readTable(userDb);
  attributesTable.setContents(contents);
  AttributesDao dao = new AttributesDao(getName(), database, userDb,
      attributesTable);
  return dao;
}
origin: ngageoint/geopackage-android

AttributesDao attributesDao = geoPackage.getAttributesDao(tableName);
AttributesCursor attributesCursor = attributesDao.queryForAll();
while (attributesCursor.moveToNext()) {
  AttributesRow attributesRow = attributesCursor.getRow();
origin: ngageoint/geopackage-android

AttributesRow newRow = attributesDao.newRow();
long rowId = attributesDao.create(newRow);
origin: ngageoint/geopackage-android

attributesTable.setContents(contents);
AttributesConnection userDb = new AttributesConnection(database);
AttributesDao dao = new AttributesDao(getName(), database, userDb,
    attributesTable);
origin: ngageoint/geopackage-java

/**
 * {@inheritDoc}
 */
@Override
public AttributesRow newRow() {
  return new AttributesRow(getTable());
}
origin: ngageoint/geopackage-java

/**
 * {@inheritDoc}
 */
@Override
protected AttributesRow newRow() {
  return getDao().newRow();
}
mil.nga.geopackage.attributesAttributesDao

Javadoc

Attributes DAO for reading attributes user data tables

Most used methods

  • getTable
  • newRow
  • <init>
    Constructor
  • create
  • delete
  • getDatabaseConnection
  • getDb
  • getTableName
  • queryForAll
  • queryForEq
  • queryForIdRow
  • queryForValueFieldValues
  • queryForIdRow,
  • queryForValueFieldValues,
  • update

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BoxLayout (javax.swing)
  • Top plugins for Android Studio
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