PostgreSQL Converse

Create Java Entity Bean (not EJB CMP)
  pgsql.py  
功能簡介:pgsql.py 是一個將資料庫表直接生成java bean和HTML From的軟件,使用方法運行 pysql.py然後輸入表名即可
Sample:
  Users.java Users.html
  Groups.java Groups.html
  System_log.java System_log.html
  Company.java Company.html
  Person.java Person.html
     
  mail2pgsql.py 未完成

功能:實現一個SMTP Server 將郵件投遞到PostgreSQL資料庫中, 只要稍加改動就可以實現mail2sms,mail2xxx

  socket-file.log  

 

軟件使用方法
[root@linux tmp]# ./pgsql.py
Please enter a table: system_log
[root@linux tmp]#
查看生成的Java Bean
[root@linux tmp]# ls
Groups.java  Oa.meeting.java  pgsql.py  Role.java  System_log.java  Users.java  workfile.java
[root@linux tmp]# cat System_log.java |more
package netkiller.ebusiness;

import java.sql.*;
import java.util.*;
import netkiller.database.*;
import netkiller.security.*;
public class System_log{

    private String status = null;
    private String description = null;
    private String ip = null;
    private String oid = null;
    private String login_date = null;
    private String id = null;
    private String uid = null;

    public System_log(){
    }

    public void setStatus(String value){
        this.status = value;
    }
    public String getStatus(){
        return this.status;
    }
    public void setDescription(String value){
        this.description = value;
    }
    public String getDescription(){
        return this.description;
    }
    public void setIp(String value){
        this.ip = value;
    }
    public String getIp(){
        return this.ip;
    }
    public void setOid(String value){
        this.oid = value;
    }
    public String getOid(){
        return this.oid;
--More--
				  
				    
配置方法 (修改綠色部分)
[root@linux tmp]# cat pgsql.py |more
#!/usr/bin/python

#############################################################
# Created 2003-12-6
# Modified
# Project PostgreSQL Converse
# Model Create Java Entity Bean (not EJB CMP)
# Company Organizations
# Author 陳景峰
# Nickname netkiller
# Email openunix@163.com
# Version 1.0
# Database PostgreSQL 7.3.4
#############################################################

import pg
import string
db = pg.DB(dbname='netkiller', host='127.0.0.1', user='netkiller',passwd='chen')

 

註:轉載請註明原文檔出處
主頁 | 關閉

陳景峰(netkiller) ICQ:101888222
Yahoo:bg7nyt,AIM:bg7nyt
Email:openunix(at)163(dot)com
Download AIMAIM RemoteSend me an Instant MessageAdd me to Your Buddy ListJoin my Chat RoomSend me an EmailAdd Remote to Your Page
Download AOL Instant Messenger