/** */ public JdbcType getJdbcType() { JdbcType type = new JdbcType(); type.setCacheName("TEST_CACHE"); type.setKeyType(Integer.class); type.setValueType(TestPojo.class); type.setDatabaseSchema("PUBLIC"); type.setDatabaseTable("TEST_CACHE"); type.setKeyFields(new JdbcTypeField(java.sql.Types.INTEGER, "VALUE2", Integer.class, "value2")); type.setValueFields( new JdbcTypeField(java.sql.Types.VARCHAR, "VALUE1", String.class, "value1"), new JdbcTypeField(java.sql.Types.DATE, "VALUE3", java.sql.Date.class, "value3") ); return type; }
storeTypes[0] = new JdbcType(); storeTypes[0].setDatabaseSchema("PUBLIC"); storeTypes[0].setDatabaseTable("ORGANIZATION"); storeTypes[1] = new JdbcType(); storeTypes[1].setDatabaseSchema("PUBLIC"); storeTypes[1].setDatabaseTable("PERSON"); storeTypes[2] = new JdbcType(); storeTypes[2].setDatabaseSchema("PUBLIC"); storeTypes[2].setDatabaseTable("PERSON_COMPLEX"); storeTypes[3] = new JdbcType(); storeTypes[3].setDatabaseSchema("PUBLIC"); storeTypes[3].setDatabaseTable("TIMESTAMP_ENTRIES"); storeTypes[4] = new JdbcType(); storeTypes[4].setDatabaseSchema("PUBLIC"); storeTypes[4].setDatabaseTable("STRING_ENTRIES"); storeTypes[5] = new JdbcType(); storeTypes[5].setDatabaseSchema("PUBLIC"); storeTypes[5].setDatabaseTable("UUID_ENTRIES"); storeTypes[6] = new JdbcType(); storeTypes[6].setDatabaseSchema("PUBLIC"); storeTypes[6].setDatabaseTable("BINARY_ENTRIES");
JdbcType[] storeTypes = new JdbcType[2]; storeTypes[0] = new JdbcType(); storeTypes[0].setCacheName(CACHE_NAME); storeTypes[0].setDatabaseSchema("PUBLIC"); new JdbcTypeField(Types.VARCHAR, escape ? "CITY" : "City", String.class, "city")); storeTypes[1] = new JdbcType(); storeTypes[1].setCacheName(CACHE_NAME); storeTypes[1].setDatabaseSchema("PUBLIC");
/** * Create JDBC type for Person. * * @param cacheName Cache name. * @return Configured JDBC type. */ private static JdbcType jdbcTypePerson(String cacheName) { JdbcType jdbcType = new JdbcType(); jdbcType.setCacheName(cacheName); jdbcType.setDatabaseSchema("PUBLIC"); jdbcType.setDatabaseTable("PERSON"); jdbcType.setKeyType("org.apache.ignite.PersonKey"); jdbcType.setValueType("org.apache.ignite.Person"); jdbcType.setKeyFields( new JdbcTypeField(Types.NUMERIC, "ID", long.class, "id") ); jdbcType.setValueFields( new JdbcTypeField(Types.VARCHAR, "FIRST_NAME", String.class, "firstName"), new JdbcTypeField(Types.VARCHAR, "LAST_NAME", String.class, "lastName"), new JdbcTypeField(Types.DOUBLE, "SALARY", Double.class, "salary") ); return jdbcType; }