Create Java Entity Bean (not EJB CMP) 相关文件下载:1205.zip | ||
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--
配置方法
- import pg
- import string
- db = pg.DB(dbname='netkiller', host='127.0.0.1', user='netkiller',passwd='chen')