Package net.sf.hajdbc

Examples of net.sf.hajdbc.TableProperties


        {
          String table = support.parseInsertTable(sql);
         
          if (table != null)
          {
            TableProperties tableProperties = this.getDatabaseProperties().findTable(table);
           
            if (tableProperties == null)
            {
              throw new SQLException(Messages.SCHEMA_LOOKUP_FAILED.getMessage(table, cluster, cluster.getDialect().getClass().getName() + ".getDefaultSchemas()"));
            }
           
            if (!tableProperties.getIdentityColumns().isEmpty())
            {
              identifierSet.add(tableProperties.getName().getDMLName());
            }
          }
        }
      }
    }
View Full Code Here


   * @see net.sf.hajdbc.dialect.StandardDialectTest#getTruncateTableSQL()
   */
  @Override
  public void getTruncateTableSQL() throws SQLException
  {
    TableProperties table = mock(TableProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(table.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("table");
   
    String result = this.dialect.getTruncateTableSQL(table);
   
    assertEquals("TRUNCATE TABLE table", result);
View Full Code Here

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getTruncateTableSQL()
   */
  @Override
  public void getTruncateTableSQL() throws SQLException
  {
    TableProperties table = mock(TableProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(table.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("table");
   
    String result = this.dialect.getTruncateTableSQL(table);
   
    assertEquals("TRUNCATE TABLE table", result);
View Full Code Here

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getTruncateTableSQL()
   */
  @Override
  public void getTruncateTableSQL() throws SQLException
  {
    TableProperties table = mock(TableProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(table.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("table");
   
    String result = this.dialect.getTruncateTableSQL(table);
   
    assertEquals("TRUNCATE TABLE table", result);
View Full Code Here

  }

  @Test
  public void getTruncateTableSQL() throws SQLException
  {
    TableProperties table = mock(TableProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(table.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("table");
   
    String result = this.dialect.getTruncateTableSQL(table);
   
    assertEquals("DELETE FROM table", result);
View Full Code Here

  {
    IdentityColumnSupport support = this.dialect.getIdentityColumnSupport();
   
    if (support != null)
    {
      TableProperties table = mock(TableProperties.class);
      ColumnProperties column = mock(ColumnProperties.class);
      QualifiedName name = mock(QualifiedName.class);
     
      when(table.getName()).thenReturn(name);
      when(name.getDDLName()).thenReturn("table");
      when(column.getName()).thenReturn("column");
     
      String result = support.getAlterIdentityColumnSQL(table, column, 1000L);
     
View Full Code Here

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getTruncateTableSQL()
   */
  @Override
  public void getTruncateTableSQL() throws SQLException
  {
    TableProperties table = mock(TableProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(table.getName()).thenReturn(name);
    when(name.getDMLName()).thenReturn("table");
   
    String result = this.dialect.getTruncateTableSQL(table);
   
    assertEquals("TRUNCATE TABLE table", result);
View Full Code Here

   * @see net.sf.hajdbc.dialect.StandardDialectTest#getAlterIdentityColumnSQL()
   */
  @Override
  public void getAlterIdentityColumnSQL() throws SQLException
  {
    TableProperties table = mock(TableProperties.class);
    ColumnProperties column = mock(ColumnProperties.class);
    QualifiedName name = mock(QualifiedName.class);
   
    when(table.getName()).thenReturn(name);
    when(name.getDDLName()).thenReturn("table");
    when(column.getName()).thenReturn("column");
   
    String result = this.dialect.getIdentityColumnSupport().getAlterIdentityColumnSQL(table, column, 1000L);

View Full Code Here

   
    Collection<QualifiedName> tables = dialect.getTables(metaData, this.nameFactory);
   
    for (QualifiedName table: tables)
    {
      TableProperties properties = new EagerTableProperties(table, metaData, dialect, this.nameFactory);
     
      this.tables.put(properties.getName(), properties);
    }
   
    List<String> defaultSchemaList = dialect.getDefaultSchemas(metaData);
   
    this.defaultSchemas = new ArrayList<String>(defaultSchemaList);
View Full Code Here

    {
      tables = new HashMap<QualifiedName, TableProperties>();
     
      for (QualifiedName table: this.dialect.getTables(this.provider.getDatabaseMetaData(), this.nameFactory))
      {
        TableProperties properties = new LazyTableProperties(table, this.provider, this.dialect, this.nameFactory);
       
        tables.put(properties.getName(), properties);
      }
     
      if (!this.tablesRef.compareAndSet(null, tables))
      {
        return this.tablesRef.get();
View Full Code Here

TOP

Related Classes of net.sf.hajdbc.TableProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.