本文整理匯總了Java中com.goldengate.atg.datasource.meta.TableName類的典型用法代碼示例。如果您正苦於以下問題:Java TableName類的具體用法?Java TableName怎麽用?Java TableName使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TableName類屬於com.goldengate.atg.datasource.meta包,在下文中一共展示了TableName類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: trainSimpleOpMock
import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
private void trainSimpleOpMock() {
TableName tableName = mock(TableName.class);
when(tableName.getSchemaName()).thenReturn(SCHEMA_NAME);
when(tableName.getShortName()).thenReturn(TABLE_NAME);
when(op.getTableName()).thenReturn(tableName);
when(op.getOperationType()).thenReturn(DsOperation.OpType.DO_INSERT);
when(op.getRba()).thenReturn(1L);
when(op.getTxState()).thenReturn(TxState.END);
when(op.iterator()).thenReturn(Collections.EMPTY_LIST.listIterator());
}
示例2: testWriteOp
import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
@Test(testName = "測試寫入op")
public void testWriteOp(){
ArrayList<ColumnMetaData> columnMetaDatas = new ArrayList<ColumnMetaData>();
ColumnMetaData columnMetaData = new ColumnMetaData("c1", 1);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c2", 2);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c3", 3);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c4", 4);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c5", 5);
columnMetaDatas.add(columnMetaData);
TableName tableName = new TableName("ogg_test.t_person");
TableMetaData tableMetaData = new TableMetaData(tableName, columnMetaDatas);
DsMetaData dsMetaData = new DsMetaData();
dsMetaData.setTableMetaData(tableMetaData);
DsColumn[] columns = new DsColumn[5];
columns[0] = new DsColumnAfterValue("testNormal");
columns[1] = new DsColumnAfterValue("2");
columns[2] = new DsColumnAfterValue("3");
columns[3] = new DsColumnAfterValue("2016-05-20 09:00:00");
columns[4] = new DsColumnAfterValue("6");
DsRecord dsRecord = new DsRecord(columns);
DsOperation dsOperation = new DsOperation(tableName, DsOperation.OpType.DO_INSERT, "2016-05-13 19:15:15.010",0l, 0l, dsRecord);
Op op = new Op(dsOperation, tableMetaData, null);
BadOperateWriter.write(op,
"ogg_test.t_person",
"t_person",
"op.txt",
10000,
"op error");
FileUtils.deleteQuietly(new File("op.txt"));
}
示例3: getConfigurationForTable
import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
protected Optional<TableConfiguration> getConfigurationForTable(TableName tableName) {
return configuration.getTableConfiguration(tableName.getSchemaName(),tableName.getShortName());
}
示例4: processOpImpl
import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
protected void processOpImpl(Tx currentTx, Op op) {
TableName tname = op.getTableName();
//TableMetaData tMeta = getMetaData().getTableMetaData(tname);
handler.processOp(op);
}
示例5: init
import com.goldengate.atg.datasource.meta.TableName; //導入依賴的package包/類
@BeforeClass
public void init() throws DocumentException {
datahubHandler = new DatahubHandler();
datahubHandler.setState(DataSourceListener.State.READY);
configure = ConfigureReader.reader("src/test/resources/configure.xml");
datahubHandler.setConfigure(configure);
RecordBuilder.init(configure);
DataHubWriter.init(configure);
OperationHandlerManager.init();
ArrayList<ColumnMetaData> columnMetaDatas = new ArrayList<ColumnMetaData>();
ColumnMetaData columnMetaData = new ColumnMetaData("c1", 1);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c2", 2);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c3", 3);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c4", 4);
columnMetaDatas.add(columnMetaData);
columnMetaData = new ColumnMetaData("c5", 5);
columnMetaDatas.add(columnMetaData);
tableName = new TableName("ogg_test.t_person");
TableMetaData tableMetaData = new TableMetaData(tableName, columnMetaDatas);
DsMetaData dsMetaData = new DsMetaData();
dsMetaData.setTableMetaData(tableMetaData);
GGTranID ggTranID = GGTranID.getID(0l, 0l);
dsTransaction = new DsTransaction(ggTranID);
e = new DsEventManager.TxEvent(dsTransaction, dsMetaData, "");
}