org.qi4j.index.sql.support.skeletons

## Class AbstractSQLIndexing

- java.lang.Object
- - org.qi4j.index.sql.support.skeletons.AbstractSQLIndexing

- All Implemented Interfaces:
    SQLIndexing
  Direct Known Subclasses:
    PostgreSQLIndexing

      public abstract class AbstractSQLIndexing
      extends Object
      implements SQLIndexing

  TODO SQL-Generator now has support for auto-generated columns. Use it in indexing ( should make some things quite faster and simpler ).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Integer` | `AMOUNT_OF_COLUMNS_IN_ALL_QNAMES_TABLE`
    `static Integer` | `AMOUNT_OF_COLUMNS_IN_ASSO_TABLE`
    `static Integer` | `AMOUNT_OF_COLUMNS_IN_ENTITY_TABLE`
    `static Integer` | `AMOUNT_OF_COLUMNS_IN_MANY_ASSO_TABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSQLIndexing()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addEntityInfoToInsertToEntityTablePS(EntityState state, PreparedStatement ps, int startingIndex)`
    `protected org.sql.generation.api.grammar.modification.InsertStatement` | `createAssoInsert(QNameInfo qNameInfo, org.sql.generation.api.vendor.SQLVendor vendor, Integer amountOfParams)`
    `protected org.sql.generation.api.grammar.modification.DeleteStatement` | `createClearEntityDataStatement(String schemaName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.modification.DeleteStatement` | `createDeleteFromEntityTableStatement(String schemaName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.modification.DeleteStatement` | `createDeleteFromTableStatement(String schemaName, String tableName, String columnName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.modification.InsertStatement` | `createInsertEntityTypeStatement(String schemaName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.modification.InsertStatement` | `createInsertStatement(String schemaName, String tableName, Integer amountOfColumns, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected abstract org.sql.generation.api.grammar.modification.InsertStatement` | `createInsertStatementWithAutoGeneratedIDForEntitiesTable(String schemaName, String tableName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.modification.InsertStatement` | `createPropertyInsert(QNameInfo qNameInfo, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.query.QueryExpression` | `createQueryEntityPkByIdentityStatement(String schemaName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected org.sql.generation.api.grammar.modification.UpdateStatement` | `createUpdateEntityTableStatement(String schemaName, org.sql.generation.api.vendor.SQLVendor vendor)`
    `protected Long` | `findEntityPK(EntityState state, org.qi4j.index.sql.support.skeletons.SQLSkeletonUtil.Lazy<PreparedStatement,SQLException> queryPKPS)`
    `protected abstract long` | `getPKFromAutoGeneratedIDInsert(EntityState state, PreparedStatement autoGeneratedIDStatement, org.sql.generation.api.vendor.SQLVendor vendor, Connection connection)`
    `void` | `indexEntities(Iterable<EntityState> changedStates)` This method is called when states need to be indexed.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### AMOUNT_OF_COLUMNS_IN_ENTITY_TABLE

          public static final Integer AMOUNT_OF_COLUMNS_IN_ENTITY_TABLE

    - #### AMOUNT_OF_COLUMNS_IN_ALL_QNAMES_TABLE

          public static final Integer AMOUNT_OF_COLUMNS_IN_ALL_QNAMES_TABLE

    - #### AMOUNT_OF_COLUMNS_IN_ASSO_TABLE

          public static final Integer AMOUNT_OF_COLUMNS_IN_ASSO_TABLE

    - #### AMOUNT_OF_COLUMNS_IN_MANY_ASSO_TABLE

          public static final Integer AMOUNT_OF_COLUMNS_IN_MANY_ASSO_TABLE

  - ### Constructor Detail

    - #### AbstractSQLIndexing

          public AbstractSQLIndexing()

  - ### Method Detail

    - #### indexEntities

          public void indexEntities(Iterable<EntityState> changedStates)
                             throws SQLException

      Description copied from interface: `SQLIndexing`
      This method is called when states need to be indexed.
      Specified by:
        `indexEntities` in interface `SQLIndexing`
      Parameters:
        `changedStates` - The states which changed.
      Throws:
        `SQLException` - If SQL.

    - #### createInsertStatement

          protected org.sql.generation.api.grammar.modification.InsertStatement createInsertStatement(String schemaName,
                                                                                          String tableName,
                                                                                          Integer amountOfColumns,
                                                                                          org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createInsertStatementWithAutoGeneratedIDForEntitiesTable

          protected abstract org.sql.generation.api.grammar.modification.InsertStatement createInsertStatementWithAutoGeneratedIDForEntitiesTable(String schemaName,
                                                                                                                             String tableName,
                                                                                                                             org.sql.generation.api.vendor.SQLVendor vendor)

    - #### addEntityInfoToInsertToEntityTablePS

          protected void addEntityInfoToInsertToEntityTablePS(EntityState state,
                                                  PreparedStatement ps,
                                                  int startingIndex)
                                                       throws SQLException

      Throws:
        `SQLException`

    - #### findEntityPK

          protected Long findEntityPK(EntityState state,
                          org.qi4j.index.sql.support.skeletons.SQLSkeletonUtil.Lazy<PreparedStatement,SQLException> queryPKPS)
                               throws SQLException

      Throws:
        `SQLException`

    - #### getPKFromAutoGeneratedIDInsert

          protected abstract long getPKFromAutoGeneratedIDInsert(EntityState state,
                                            PreparedStatement autoGeneratedIDStatement,
                                            org.sql.generation.api.vendor.SQLVendor vendor,
                                            Connection connection)
                                                          throws SQLException

      Throws:
        `SQLException`

    - #### createUpdateEntityTableStatement

          protected org.sql.generation.api.grammar.modification.UpdateStatement createUpdateEntityTableStatement(String schemaName,
                                                                                                     org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createQueryEntityPkByIdentityStatement

          protected org.sql.generation.api.grammar.query.QueryExpression createQueryEntityPkByIdentityStatement(String schemaName,
                                                                                                    org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createDeleteFromEntityTableStatement

          protected org.sql.generation.api.grammar.modification.DeleteStatement createDeleteFromEntityTableStatement(String schemaName,
                                                                                                         org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createClearEntityDataStatement

          protected org.sql.generation.api.grammar.modification.DeleteStatement createClearEntityDataStatement(String schemaName,
                                                                                                   org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createDeleteFromTableStatement

          protected org.sql.generation.api.grammar.modification.DeleteStatement createDeleteFromTableStatement(String schemaName,
                                                                                                   String tableName,
                                                                                                   String columnName,
                                                                                                   org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createPropertyInsert

          protected org.sql.generation.api.grammar.modification.InsertStatement createPropertyInsert(QNameInfo qNameInfo,
                                                                                         org.sql.generation.api.vendor.SQLVendor vendor)

    - #### createAssoInsert

          protected org.sql.generation.api.grammar.modification.InsertStatement createAssoInsert(QNameInfo qNameInfo,
                                                                                     org.sql.generation.api.vendor.SQLVendor vendor,
                                                                                     Integer amountOfParams)

    - #### createInsertEntityTypeStatement

          protected org.sql.generation.api.grammar.modification.InsertStatement createInsertEntityTypeStatement(String schemaName,
                                                                                                    org.sql.generation.api.vendor.SQLVendor vendor)