Some points of Data exchange

 

 1. SAXBuilder converts an XML file into a JDOM tree

 

 2. Xpath查询选择节点,newInstance得到xpath对象后selectNodes or selectSingleNode

 

 3. Publish event 使用 HttpClient,StringTree json 构造eventJsonStr

 

      JSONWriter writer = new JSONWriter(false);
      Map map = new HashMap();
      map.put("event",eventName);
      map.put("source", event);  
      map.put("param", param);
      String eventJsonStr = writer.write(map);

 

 4.  JmsTemplate.send(),  创建发送的信息类型 msg = session.createTextMessage();

 

 5. metaDate 得到表的元数据信息;

 

     databaseMetaData = conn.getMetaData();
     rs = databaseMetaData.getColumns(null, param.getSchema().toUpperCase(),      

     tableName.toUpperCase(), null);
     while (rs.next()) {
        ColumnBean colb = new ColumnBean();
        colb.setName(rs.getString("COLUMN_NAME"));
        colb.setType(rs.getString("TYPE_NAME"));
        columnBeanList.add(colb);
    }

 

 6. 三种主流数据库的数据类型对比

 

Oracle 数据类型

SqlServer 数据类型

MySql数据类型

BLOB

VARBINARY(MAX)

Blob

CHAR

CHAR

Char

CLOB

VARCHAR(MAX)

text

DATE

DATETIME

date

FLOAT

FLOAT

float

INT

NUMERIC(38)

INTEGER

INTERVAL

DATETIME

DATETIME

LONG

VARCHAR(MAX)

text

NUMBER

FLOAT

float

TIMESTAMP

DATETIME

TIMESTAMP

VARCHAR2

VARCHAR

VARCHAR

 

你可能感兴趣的:(Exchange)