public JConnection addToTargetWriteConnection( ConnectionType type, EntityFigure name, Integer occurences) { JConnection connection = addRightLeftConnection(type, name, occurences); connection.setWriteStyle(); return connection; }
public JConnection addToSourceWeakWriteConnection( ConnectionType type, EntityFigure name, Integer occurences) { JConnection connection = addToSourceWriteConnection(type, name, occurences); connection.setDottedLine(); return connection; }
public JConnection addRightLeftMethodConnection( ConnectionType type, EntityFigure name, Integer occurences) { JConnection connection = addRightLeftConnection(type, name, occurences); connection.setMethodToMethodStyle(); return connection; }
public JConnection addToSourceMethodConnection( ConnectionType type, EntityFigure label, Integer occurences) { JConnection connection = addLeftRightConnection(type, label, occurences); connection.setMethodToMethodStyle(); connection.setDottedLine(); return connection; }
public JConnection addToSourceReadConnection( ConnectionType type, EntityFigure name, Integer occurences) { JConnection connection = addLeftRightConnection(type, name, occurences); connection.setReadStyle(); return connection; }
public JConnection addToSameClassMethodConnectionLL( ConnectionType type, EntityFigure label, Integer occurences, int bendHeight) { JConnection connection = addLeftLeftConnection(type, label, occurences, bendHeight); connection.setMethodToMethodStyle(); return connection; }
public JConnection addToSameClassReadConnectionRR( ConnectionType type, EntityFigure label, Integer occurences, int bendHeight) { JConnection connection = addRightRightConnection(type, label, occurences, bendHeight); connection.setReadStyle(); return connection; }
public JConnection addToSourceBendConnection( ConnectionType type, EntityFigure name, Integer occurences) { JConnection connection = addLeftRightConnection(type, name, occurences); connection.setSlightBendRouter(); connection.setDottedLine(); connection.setWriteStyle(); return connection; }
public JConnection addRightLeftConnection( ConnectionType type, EntityFigure label, Integer occurences) { JConnection connection = new JConnection(type); connection.setRightLeftAnchors(this, label); connection.setLabel(occurences); outgoingConnections.add(connection); return connection; }
public JConnection addRightRightConnection( ConnectionType type, EntityFigure label, Integer occurences, int bendHeight) { JConnection connection = new JConnection(type); connection.setRightRightAnchors(this, label); // connection.setSourceBendRouter(-bendHeight, -classWidth); connection.setFullBendRouter(-bendHeight); connection.setLabel(occurences); outgoingConnections.add(connection); return connection; }
/** * @param dataSourceStub JDataSourceStub * @return JConnection * @throws Exception */ protected static JConnection createConnection(JDataSourceStub dataSourceStub) throws Exception { JConnection jconn = null; if (dataSourceStub.DBClass == null) { dataSourceStub.DBClass = Class.forName(dataSourceStub.classname); } if (dataSourceStub.NAClass == null) { dataSourceStub.NAClass = Class.forName(dataSourceStub.dbclass); } if (dataSourceStub.NAClass != null) { jconn = (JConnection) dataSourceStub.NAClass.newInstance(); } if (jconn != null) jconn.setDataBaseType(dataSourceStub.DataBaseType); return jconn; }
boolean lookDataSource(JConnection jconn, JParamObject PO) throws Exception { boolean hasDataSource = false; if (jconn != null) { String dataSource = PO.GetValueByEnvName("DataSource"); if (dataSource != null && !"".equals(dataSource)) { DataSource ds = null; // try { // ds = (DataSource) jconn.getDBContext().lookup("jdbc/" + // dataSource); // } // catch (Exception e) { // Context context = new InitialContext(); // Context envContext = (Context) context.lookup( // "java:/comp/env"); // ds = (DataSource) envContext.lookup("jdbc/" + dataSource); // // } if (ds != null) { jconn.getInstance(ds.getConnection()); hasDataSource = true; } } } return hasDataSource; }
/** * @param conn JConnection * @param PO JParamObject * @param DSS JDataSourceStub * @param custObj Object * @return JConnection * @throws Exception */ protected static JConnection initConnection( JConnection conn, JParamObject PO, JDataSourceStub dataSourceStub, AccountStub accountStub, DataStorageStub dataStorageStub) throws Exception { if (conn.InitConnection(PO, dataSourceStub, accountStub, dataStorageStub) == null) return null; // if (PO.isAutoConnection()) { // PO.addConn(conn); // } // 写入日志 writeLoginfo(conn, PO); // add by fsz List sqlList = (List) PO.getValue("$$SQL_VIEWLIST", null); if (sqlList != null) { // conn.setSqlLogList(sqlList); } return conn; }