duan.java

来自「mysql 根据你的配置 程序会自动生成sql语句 然后就可以把这些sql语」· Java 代码 · 共 54 行

JAVA
54
字号
package com.cql.user;

public class Duan {
	private String name;
	private String type;
	private int pirmaryKey;
	
	public int getPirmaryKey() {
		return pirmaryKey;
	}
	public void setPirmaryKey(int pirmaryKey) {
		this.pirmaryKey = pirmaryKey;
	}
	public String getForeignKey() {
		return foreignKey;
	}
	public void setForeignKey(String foreignKey) {
		this.foreignKey = foreignKey;
	}
	private String foreignKey;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getCreateSQL()
	{   String str = "";
		str += name +" " +type+" ";
		if(pirmaryKey == 0)
		{
			str +="";
		}else{
			str +="primary key";
		}
		
		if(foreignKey == null || foreignKey.equals(""))
		{
			str +="";
		}else
		{
			str +="foreign key "+this.getForeignKey()+"("+this.name+") ";
		}
		return str;
	}
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?