Best code examples for Hibernate ORM Table class (org.hibernate.mapping.Table)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM Table class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM Table examples from Open Source projects
This code example shows how to use the following methods: setAbstract, setCatalog, setName, setSchema
This code example shows how to use the following methods: getCatalog, getName, getSchema
		if (left==null || right==null) return false;
		return left.equals(right);
	} 
	 
	public static TableIdentifier create(Table table) {
		return new TableIdentifier(table.getCatalog(), table.getSchema(), table.getName() );
	} 
	 
	public String toString() {
		StringBuffer buf = new StringBuffer()
					.append( "TableIdentifier" )
					.append('(');
		if ( getCatalog()!=null ) buf.append( getCatalog() + "." );
		if ( getSchema()!=null ) buf.append( getSchema()+ ".");
		buf.append( getName() ).append(')');
		return buf.toString();
	} 
	 
} 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getCatalog, getName, getSchema
	public void testOverlapping() { 
		 
		JDBCMetaDataConfiguration configuration = new JDBCMetaDataConfiguration();
		 
		OverrideRepository or = new OverrideRepository();
		or.addSchemaSelection(new SchemaSelection(null, "OVRTEST"));
		or.addSchemaSelection(new SchemaSelection(null, null));
		configuration.setReverseEngineeringStrategy(or.getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy()));
		configuration.readFromJDBC();
		 
		Set tables = new HashSet();
		Iterator iter = configuration.getTableMappings();
		while(iter.hasNext()) {
			Table element = (Table) iter.next();
			boolean added = tables.add(TableIdentifier.create(element));
			if(!added) fail("duplicate table found for " + element); 
		} 
		 
		assertEquals(4,tables.size());					
	} 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getQualifiedName, sqlDropString
    return DriverManager.getConnection(
        _tool.getDbServerHost() + "/" + _tool.getTestCatalog(), _tool.getUser(), _tool.getPassword());
  } 
 
  private void createTestTable() throws SQLException {
    Table table = new Table(TEST_TABLE);
    try { 
      String dropSql = table.sqlDropString(_tool.getHibernateDialect(), null, _tool
          .getTestSchema()); 
      _tool.executeSql(_tool.getTestCatalog(), _tool.getTestSchema(), dropSql);
    } catch (OpenGammaRuntimeException e) {
      // It might not exist, that's OK 
    } 
    String createSql = "CREATE TABLE "
        + table.getQualifiedName(_tool.getHibernateDialect(), null, _tool
            .getTestSchema()) + " (test_column char(50))"; 
    _tool.executeSql(_tool.getTestCatalog(), _tool.getTestSchema(), createSql);
  } 
 
} 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getCatalog, getName, getSchema
		 
		if(catchild.getName().equals(TABLE2)) {
			catchild = (Table) tables.get(1);
			catmaster = (Table) tables.get(0);
		}  
			 
		TableIdentifier masterid = TableIdentifier.create(catmaster);
		TableIdentifier childid = TableIdentifier.create(catchild);
		 
		assertEquals(new TableIdentifier(null, SCHEMA, TABLE1), childid);
		assertEquals(new TableIdentifier(null, SCHEMA, TABLE2), masterid);
	} 
	 
	public void testNeedQuote() { 
		Settings buildSettings = cfg.buildSettings();
		ServiceRegistry serviceRegistry = cfg.getServiceRegistry();
				 
		MetaDataDialect realMetaData = JDBCReaderFactory.newMetaDataDialect( serviceRegistry.getService(JdbcServices.class).getDialect(), cfg.getProperties() );
		assertTrue("The name must be quoted!", realMetaData.needQuote(SCHEMA));
		assertTrue("The name must be quoted!", realMetaData.needQuote(TABLE1));
Full Snippet Info
6
CodeRank