コード例 #1
0
  public JConnection addToTargetWriteConnection(
      ConnectionType type, EntityFigure name, Integer occurences) {
    JConnection connection = addRightLeftConnection(type, name, occurences);
    connection.setWriteStyle();

    return connection;
  }
コード例 #2
0
  public JConnection addToSourceWeakWriteConnection(
      ConnectionType type, EntityFigure name, Integer occurences) {
    JConnection connection = addToSourceWriteConnection(type, name, occurences);
    connection.setDottedLine();

    return connection;
  }
コード例 #3
0
  public JConnection addRightLeftMethodConnection(
      ConnectionType type, EntityFigure name, Integer occurences) {
    JConnection connection = addRightLeftConnection(type, name, occurences);
    connection.setMethodToMethodStyle();

    return connection;
  }
コード例 #4
0
 public JConnection addToSourceMethodConnection(
     ConnectionType type, EntityFigure label, Integer occurences) {
   JConnection connection = addLeftRightConnection(type, label, occurences);
   connection.setMethodToMethodStyle();
   connection.setDottedLine();
   return connection;
 }
コード例 #5
0
  public JConnection addToSourceReadConnection(
      ConnectionType type, EntityFigure name, Integer occurences) {
    JConnection connection = addLeftRightConnection(type, name, occurences);

    connection.setReadStyle();

    return connection;
  }
コード例 #6
0
  public JConnection addToSameClassMethodConnectionLL(
      ConnectionType type, EntityFigure label, Integer occurences, int bendHeight) {
    JConnection connection = addLeftLeftConnection(type, label, occurences, bendHeight);

    connection.setMethodToMethodStyle();

    return connection;
  }
コード例 #7
0
  public JConnection addToSameClassReadConnectionRR(
      ConnectionType type, EntityFigure label, Integer occurences, int bendHeight) {
    JConnection connection = addRightRightConnection(type, label, occurences, bendHeight);

    connection.setReadStyle();

    return connection;
  }
コード例 #8
0
  public JConnection addToSourceBendConnection(
      ConnectionType type, EntityFigure name, Integer occurences) {
    JConnection connection = addLeftRightConnection(type, name, occurences);
    connection.setSlightBendRouter();
    connection.setDottedLine();
    connection.setWriteStyle();

    return connection;
  }
コード例 #9
0
  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;
  }
コード例 #10
0
  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;
  }
コード例 #11
0
 /**
  * @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;
 }
コード例 #12
0
 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;
 }
コード例 #13
0
 /**
  * @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;
 }