⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlrole.java

📁 导出ORACLE数据库对象DDL语句的程序
💻 JAVA
字号:
package com.icbcsdc.ddlexp.pub.xml.nodeinfo;

import java.io.InputStream;

/**
 * @author zhangyc
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class XMLRole extends XMLNode {
	private String authentication=null;
	
	public XMLRole(String roleName,String authen) throws NodeException{
		this.name=roleName;
		this.authentication=authen;
		
		//refresh();
		/**
		objPrivs.refresh();
		roles.refresh();
		sysPrivs.refresh();
		**/
	}
	
	public XMLRole(String roleName) throws NodeException{
		this.name=roleName;
		
		/**
		objPrivs.refresh();
		roles.refresh();
		sysPrivs.refresh();
		**/
	}
	
	/**
	 * @see com.icbcsdc.ddlexp.pub.xml.nodeinfo.XMLNode#getType()
	 */
	public int getType() {
		return XMLNode.XML_ROLE;
	}
	/**从数据库中获取数据对象比较后的结果*/
	public void refreshChangedProperties(){
	}
	
	/**从数据库中获取数据对象定义*/
	public void refreshDDLInfo()throws Exception{
		XMLRoleGrantedObjPrivs objPrivs=new XMLRoleGrantedObjPrivs();
		XMLRoleGrantedRoles roles=new XMLRoleGrantedRoles();
		XMLRoleGrantedSysPrivs sysPrivs=new XMLRoleGrantedSysPrivs();
		
		try {
			this.addChild(objPrivs);
			this.addChild(roles);
			this.addChild(sysPrivs);
		} catch (NodeException e) {
			e.printStackTrace();
		}
		
	}


	/**
	 * @see com.icbcsdc.ddlexp.pub.xml.nodeinfo.XMLNode#refresh()
	 */
	public void refresh() throws Exception{
		refreshNodeNeedAccessDB();		
		super.refresh();
	}

	/**
	 * @see com.icbcsdc.ddlexp.pub.xml.nodeinfo.XMLNode#chkChildType(XMLNode)
	 */
	public boolean chkChildType(XMLNode node) {
		if(node.getType()==XMLNode.XML_ROLE_GRANTED_ROLE) return true;
		if(node.getType()==XMLNode.XML_ROLE_GRANTED_SYS_PRIVS) return true;
		if(node.getType()==XMLNode.XML_ROLE_GRANTED_OBJ_PRIVS) return true;
		return false;
	}

	/**
	 * @see com.icbcsdc.ddlexp.pub.xml.nodeinfo.XMLNode#getXmlStream()
	public InputStream getXmlStream() {
		return null;
	}
	 */

	/**
	 * @see com.icbcsdc.ddlexp.pub.xml.nodeinfo.XMLNode#getSqlDDL()
	 */
	public String getSqlDDL() {
		return this.getNoSchemaDDLStr();
	}

	public static void main(String[] args) {
	}
	/**
	 * Returns the authentication.
	 * @return String
	 */
	public String getAuthentication() {
		return authentication;
	}

}

⌨️ 快捷键说明

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