You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/01/09 18:16:27 UTC
cvs commit: jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/propertyEditors JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java
arminw 2003/01/09 09:16:27
Modified: src/java/org/apache/ojb/tools/mapping/reversedb2/ojbmetatreemodel
OjbMetaJdbcConnectionDescriptorNode.java
src/java/org/apache/ojb/tools/mapping/reversedb2/propertyEditors
JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java
Log:
update classes after kernel changes made
Revision Changes Path
1.4 +37 -37 jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/ojbmetatreemodel/OjbMetaJdbcConnectionDescriptorNode.java
Index: OjbMetaJdbcConnectionDescriptorNode.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/ojbmetatreemodel/OjbMetaJdbcConnectionDescriptorNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- OjbMetaJdbcConnectionDescriptorNode.java 4 Sep 2002 16:16:00 -0000 1.3
+++ OjbMetaJdbcConnectionDescriptorNode.java 9 Jan 2003 17:16:26 -0000 1.4
@@ -21,7 +21,7 @@
public static final String ATT_DBMS = "DBMS";
public static final String ATT_DATASOURCE_NAME = "Datasource Name";
public static final String ATT_DRIVER = "Driver";
- public static final String ATT_DESCRIPTOR_KEY = "Descriptor Key";
+ public static final String ATT_DESCRIPTOR_PBKEY = "PBKey";
public static final String ATT_JDBC_LEVEL = "JDBC Level";
public static final String ATT_PASSWORD = "Password";
public static final String ATT_PROTOCOL = "Protocol";
@@ -29,10 +29,10 @@
public static final String ATT_USERNAME = "Username";
private static java.util.ArrayList supportedActions = new java.util.ArrayList();
-
+
private JdbcConnectionDescriptor connDescriptor;
/** Creates a new instance of OjbMetaJdbcConnectionDescriptorNode */
- public OjbMetaJdbcConnectionDescriptorNode(DescriptorRepository pRepository,
+ public OjbMetaJdbcConnectionDescriptorNode(DescriptorRepository pRepository,
OjbMetaDataTreeModel pTreeModel,
OjbMetaTreeNode pparent,
JdbcConnectionDescriptor pConnDescriptor)
@@ -40,7 +40,7 @@
super(pRepository, pTreeModel, pparent);
this.connDescriptor = pConnDescriptor;
}
-
+
/** Purpose of this method is to fill the children of the node. It should
* replace all children in alChildren (the arraylist containing the children)
* of this node and notify the TreeModel that a change has occurred.
@@ -49,70 +49,70 @@
{
return true;
}
-
+
public boolean getAllowsChildren ()
{
return false;
}
-
+
public Object getAttribute (String key)
{
if (key.equals(ATT_DBALIAS))
{
- return connDescriptor.getDbAlias();
+ return connDescriptor.getDbAlias();
}
else if (key.equals(ATT_DATASOURCE_NAME))
{
- return connDescriptor.getDatasourceName();
+ return connDescriptor.getDatasourceName();
}
else if (key.equals(ATT_DRIVER))
{
- return connDescriptor.getDriver();
+ return connDescriptor.getDriver();
}
else if (key.equals(ATT_JDBC_LEVEL ))
{
- return new Double(connDescriptor.getJdbcLevel());
+ return new Double(connDescriptor.getJdbcLevel());
}
- else if (key.equals(ATT_DESCRIPTOR_KEY))
+ else if (key.equals(ATT_DESCRIPTOR_PBKEY))
{
- return connDescriptor.getDescriptorKey();
+ return connDescriptor.getPBKey();
}
else if (key.equals(ATT_PASSWORD))
{
- return connDescriptor.getPassWord();
+ return connDescriptor.getPassWord();
}
else if (key.equals(ATT_PROTOCOL))
{
- return connDescriptor.getProtocol();
+ return connDescriptor.getProtocol();
}
else if (key.equals(ATT_SUBPROTOCOL))
{
- return connDescriptor.getSubProtocol();
+ return connDescriptor.getSubProtocol();
}
else if (key.equals(ATT_USERNAME))
{
- return connDescriptor.getUserName();
- }
+ return connDescriptor.getUserName();
+ }
else if (key.equals(ATT_DBMS))
{
- return connDescriptor.getDbms();
- }
+ return connDescriptor.getDbms();
+ }
else
{
return super.getAttribute(key);
}
}
-
+
public Class getPropertyEditorClass ()
{
return org.apache.ojb.tools.mapping.reversedb2.propertyEditors.JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.class;
}
-
+
public boolean isLeaf ()
{
return true;
}
-
+
public void setAttribute (String key, Object value)
{
if (key.equals(ATT_DBALIAS))
@@ -122,7 +122,7 @@
propertyChangeDelegate.firePropertyChange(ATT_DBALIAS, oldValue, value);
// We need to send this event because the DBAlias is part of the treenode label...
this.getOjbMetaTreeModel().nodeChanged(this);
- }
+ }
else if (key.equals(ATT_DATASOURCE_NAME))
{
Object oldValue = connDescriptor.getDatasourceName();
@@ -135,10 +135,10 @@
connDescriptor.setDriver(value.toString());
propertyChangeDelegate.firePropertyChange(ATT_DRIVER, oldValue, value);
}
- else if (key.equals(ATT_DESCRIPTOR_KEY))
+ else if (key.equals(ATT_DESCRIPTOR_PBKEY))
{
/* Readonly */
- propertyChangeDelegate.firePropertyChange(ATT_DESCRIPTOR_KEY, connDescriptor.getDescriptorKey(), connDescriptor.getDescriptorKey());
+ propertyChangeDelegate.firePropertyChange(ATT_DESCRIPTOR_PBKEY, connDescriptor.getPBKey(), connDescriptor.getPBKey());
}
else if (key.equals(ATT_JDBC_LEVEL))
{
@@ -169,53 +169,53 @@
Object oldValue = connDescriptor.getUserName();
connDescriptor.setUserName(value.toString());
propertyChangeDelegate.firePropertyChange(ATT_USERNAME, oldValue, value);
- }
+ }
else if (key.equals(ATT_DBMS))
{
Object oldValue = connDescriptor.getDbms();
connDescriptor.setDbms(value.toString());
propertyChangeDelegate.firePropertyChange(ATT_DBMS, oldValue, value);
- }
+ }
else
{
super.setAttribute(key, value);
}
}
-
+
public String toString()
{
return "ConnectionDescriptor: " + connDescriptor.getDbAlias();
}
-
+
/**
* @see ActionTarget#getActions()
*/
public java.util.Iterator getActions()
{
return supportedActions.iterator();
- }
-
+ }
+
/**
* @see ActionTarget#actionListCacheable()
- */
+ */
public boolean actionListCachable()
{
return true;
}
-
+
public boolean actionListStatic()
{
return true;
}
-
+
/**
- * Return the descriptor object this node is associated with. E.g. if the
+ * Return the descriptor object this node is associated with. E.g. if the
* node displays a class descriptor, the ClassDescriptor describing the class
* should be returned. Used for creating a Transferable.
- */
+ */
public Object getAssociatedDescriptor()
{
return connDescriptor;
}
-
+
}
1.2 +16 -16 jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java
Index: JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java
===================================================================
RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/propertyEditors/JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java 4 Sep 2002 16:18:10 -0000 1.1
+++ JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor.java 9 Jan 2003 17:16:27 -0000 1.2
@@ -9,10 +9,10 @@
import org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.*;
/*
* ====================================================================
- *
+ *
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -20,7 +20,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -28,15 +28,15 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta-Regexp", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
+ * from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
@@ -62,23 +62,23 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- */
+ */
/**
* This is an implementation of a PropertyEditor for the Ojb MetaJdbcConnectionDescriptorNode class.
*
- * @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
+ * @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
* @version $Id$
*/
public class JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor extends PropertyEditor
{
-
+
/** Creates new form JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor */
public JPnlPropertyEditorOJBMetaJdbcConnectionDescriptor()
{
initComponents();
}
-
+
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@@ -198,7 +198,7 @@
add(lblDescriptorKey, gridBagConstraints);
tfDescriptorKey.setText("jTextField1");
- tfDescriptorKey.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DESCRIPTOR_KEY);
+ tfDescriptorKey.setEditorKey(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaJdbcConnectionDescriptorNode.ATT_DESCRIPTOR_PBKEY);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 5;
@@ -305,7 +305,7 @@
add(lblUsername, gridBagConstraints);
}//GEN-END:initComponents
-
+
public void setEditorTarget (PropertyEditorTarget target)
{
if (target instanceof OjbMetaJdbcConnectionDescriptorNode)
@@ -316,8 +316,8 @@
{
throw new UnsupportedOperationException("This editor can only edit OjbMetaJdbcConnectionDescriptorNode objects");
}
- }
-
+ }
+
// Variables declaration - do not modify//GEN-BEGIN:variables
private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfProtocol;
private javax.swing.JLabel lblDriver;
@@ -340,5 +340,5 @@
private javax.swing.JLabel lblDescriptorKey;
private org.apache.ojb.tools.mapping.reversedb2.propertyEditors.PropertyEditorJTextField tfDriver;
// End of variables declaration//GEN-END:variables
-
+
}