Package org.eclipse.net4j.db.derby

# Class DerbyAdapter

java.lang.Object
org.eclipse.net4j.spi.db.DBAdapter
org.eclipse.net4j.db.derby.DerbyAdapter

All Implemented Interfaces:
  `IDBAdapter`, `IDBAdapterID`

Direct Known Subclasses:
  `EmbeddedDerbyAdapter`

public abstract class DerbyAdapter extends DBAdapter
A `DB adapter` for Derby databases.

Since:
  2.0
Author:
  Eike Stepper

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.net4j.spi.db.DBAdapter

`DBAdapter.FieldInfo, DBAdapter.IndexInfo`

## Nested classes/interfaces inherited from interface org.eclipse.net4j.db.IDBAdapter

`IDBAdapter.Registry`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`VERSION`

### Fields inherited from interface org.eclipse.net4j.db.IDBAdapter

`REGISTRY`

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`DerbyAdapter(String name)`
`protected`
`DerbyAdapter(String name, String version)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getDefaultSchemaName(Connection connection)`
`protected String`
`getNullableConstraint()`
`String[]`
`getReservedWords()`
`protected String`
`getTypeName(IDBField field)`
`boolean`
`isColumnNotFoundException(SQLException ex)`
`boolean`
`isDuplicateKeyException(SQLException ex)`
Check if an exception indicates a constraint violation (duplicate key)
`boolean`
`isTableNotFoundException(SQLException ex)`
`boolean`
`isValidFirstChar(char ch)`
Check if a character is valid as first character.
`protected String`
`sqlCharIndexFunction()`

### Methods inherited from class org.eclipse.net4j.spi.db.DBAdapter

`adaptType, addIndex, addIndexField, alterTable, appendFieldDefs, appendFieldNames, convertString, convertString, convertString, convertToSQL, createConnectionProvider, createConstraints, createField, createField, createFieldDefinition, createFieldDefinitions, createIndex, createIndex, createIndex, createIndexFields, createJDBCDataSource, createPrimaryKey, createSchema, createTable, createTable, createTables, doCreateTable, dropField, dropField, dropIndex, dropIndex, dropPrimaryKey, dropTable, dropTable, dropTables, equals, forEachTable, format, format, generateReservedWords, getDefaultDBLength, getDropTableSQL, getFieldLength, getIndexInfos, getJDBCDriver, getJDBCTypeForNull, getMaxFieldNameLength, getMaxTableNameLength, getName, getSQL92ReservedWords, getVersion, hashCode, isCaseSensitive, isDuplicateKeyTransactionAbort, isPrimaryKeyShadow, isReservedWord, isTypeIndexable, modifyConnection, openSchemaTransaction, readFields, readIndices, readIndices, readSchema, readSchema, readTables, sqlCharIndex, sqlConcat, sqlModifyField, sqlModifyField, sqlRenameField, sqlSubstring, sqlSubstring, sqlSubstringFunction, toString, updateSchema, validateTable`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### VERSION

public static final String VERSION

See Also:
  - Constant Field Values

## Constructor Details

### DerbyAdapter

public DerbyAdapter(String name)

### DerbyAdapter

protected DerbyAdapter(String name, String version)

Since:
  4.3

## Method Details

### getTypeName

protected String getTypeName(IDBField field)

Overrides:
  `getTypeName` in class `DBAdapter`

### getNullableConstraint

protected String getNullableConstraint()

Overrides:
  `getNullableConstraint` in class `DBAdapter`

### getReservedWords

public String[] getReservedWords()

### getDefaultSchemaName

public String getDefaultSchemaName(Connection connection)

Specified by:
  `getDefaultSchemaName` in interface `IDBAdapter`
Overrides:
  `getDefaultSchemaName` in class `DBAdapter`

### isValidFirstChar

public boolean isValidFirstChar(char ch)
Description copied from interface: `IDBAdapter`
Check if a character is valid as first character. (e.g., underscores are forbidden as first character in Derby elements.

Specified by:
  `isValidFirstChar` in interface `IDBAdapter`
Overrides:
  `isValidFirstChar` in class `DBAdapter`

### isDuplicateKeyException

public boolean isDuplicateKeyException(SQLException ex)
Description copied from interface: `IDBAdapter`
Check if an exception indicates a constraint violation (duplicate key)

Specified by:
  `isDuplicateKeyException` in interface `IDBAdapter`
Overrides:
  `isDuplicateKeyException` in class `DBAdapter`

### isTableNotFoundException

public boolean isTableNotFoundException(SQLException ex)

Specified by:
  `isTableNotFoundException` in interface `IDBAdapter`
Overrides:
  `isTableNotFoundException` in class `DBAdapter`

### isColumnNotFoundException

public boolean isColumnNotFoundException(SQLException ex)

Specified by:
  `isColumnNotFoundException` in interface `IDBAdapter`
Overrides:
  `isColumnNotFoundException` in class `DBAdapter`

### sqlCharIndexFunction

protected String sqlCharIndexFunction()

Overrides:
  `sqlCharIndexFunction` in class `DBAdapter`