geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r462923 - in /geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory: CustomArrayDataTypeFactory.java CustomColumnFactory.java CustomDataTypeFactory.java CustomUserFactory.java
Date Wed, 11 Oct 2006 20:03:36 GMT
Author: chirino
Date: Wed Oct 11 13:03:35 2006
New Revision: 462923

URL: http://svn.apache.org/viewvc?view=rev&rev=462923
Log:
cleaned up the the base class a bit.

Modified:
    geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomArrayDataTypeFactory.java
    geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomColumnFactory.java
    geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomDataTypeFactory.java
    geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomUserFactory.java

Modified: geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomArrayDataTypeFactory.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomArrayDataTypeFactory.java?view=diff&rev=462923&r1=462922&r2=462923
==============================================================================
--- geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomArrayDataTypeFactory.java
(original)
+++ geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomArrayDataTypeFactory.java
Wed Oct 11 13:03:35 2006
@@ -16,29 +16,41 @@
  */
 package org.apache.xbean.factory.model.factory;
 
-import org.apache.xbean.factory.FactoryBeanSupport;
-import org.apache.xbean.factory.model.DataType;
-
-import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.xbean.factory.FactoryBeanSupport;
+import org.apache.xbean.factory.model.ArrayDataType;
 
 /**
  * @version $Revision: $
  */
-@XmlRootElement(name = "dataType")
-public class CustomArrayDataTypeFactory extends FactoryBeanSupport<DataType> {
+@XmlRootElement(name = "arrayDataType")
+public class CustomArrayDataTypeFactory extends FactoryBeanSupport<ArrayDataType> {
     private String name;
+	private int dimensions;
 
     public CustomArrayDataTypeFactory() {
     }
 
-    public CustomArrayDataTypeFactory(DataType value) {
+    public CustomArrayDataTypeFactory(ArrayDataType value) {
         name = value.getName();
+        dimensions = value.getDimensions();
     }
     
-    public DataType getObject() {
-        DataType datatype = new DataType();
+	@XmlTransient
+	@Override
+	public Class get_objectType() {
+		return ArrayDataType.class;
+	}
+    
+	@XmlTransient
+	@Override
+    public ArrayDataType getObject() {
+		ArrayDataType datatype = new ArrayDataType();
         datatype.setName(name);
+        datatype.setDimensions(dimensions);
         return datatype;
     }
 
@@ -50,4 +62,13 @@
     public void setName(String name) {
         this.name = name;
     }
+
+    @XmlAttribute
+	public int getDimensions() {
+		return dimensions;
+	}
+
+	public void setDimensions(int dimensions) {
+		this.dimensions = dimensions;
+	}
 }

Modified: geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomColumnFactory.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomColumnFactory.java?view=diff&rev=462923&r1=462922&r2=462923
==============================================================================
--- geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomColumnFactory.java
(original)
+++ geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomColumnFactory.java
Wed Oct 11 13:03:35 2006
@@ -16,13 +16,14 @@
  */
 package org.apache.xbean.factory.model.factory;
 
-import org.apache.xbean.factory.FactoryBeanSupport;
-import org.apache.xbean.factory.model.Column;
-
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlIDREF;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.xbean.factory.FactoryBeanSupport;
+import org.apache.xbean.factory.model.Column;
 
 /**
  * @version $Revision: $
@@ -43,6 +44,14 @@
         name = value.getName();
     }
 
+	@XmlTransient
+	@Override
+	public Class get_objectType() {
+		return Column.class;
+	}
+
+	@XmlTransient
+	@Override
     public Column getObject() {
         Column column = new Column();
         if (dataType != null) {

Modified: geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomDataTypeFactory.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomDataTypeFactory.java?view=diff&rev=462923&r1=462922&r2=462923
==============================================================================
--- geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomDataTypeFactory.java
(original)
+++ geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomDataTypeFactory.java
Wed Oct 11 13:03:35 2006
@@ -16,12 +16,13 @@
  */
 package org.apache.xbean.factory.model.factory;
 
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
 import org.apache.xbean.factory.FactoryBeanSupport;
 import org.apache.xbean.factory.model.DataType;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAttribute;
-
 /**
  * @version $Revision: $
  */
@@ -36,6 +37,14 @@
         name = value.getName();
     }
     
+	@XmlTransient
+	@Override
+	public Class get_objectType() {
+		return DataType.class;
+	}
+
+	@XmlTransient
+	@Override
     public DataType getObject() {
         DataType datatype = new DataType();
         datatype.setName(name);

Modified: geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomUserFactory.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomUserFactory.java?view=diff&rev=462923&r1=462922&r2=462923
==============================================================================
--- geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomUserFactory.java
(original)
+++ geronimo/xbean/sandbox/xbean-factory/src/main/java/org/apache/xbean/factory/model/factory/CustomUserFactory.java
Wed Oct 11 13:03:35 2006
@@ -16,11 +16,12 @@
  */
 package org.apache.xbean.factory.model.factory;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
 import org.apache.xbean.factory.FactoryBeanSupport;
 import org.apache.xbean.factory.model.User;
 
-import javax.xml.bind.annotation.XmlRootElement;
-
 /**
  * @version $Revision: $
  */
@@ -30,6 +31,7 @@
     private String name;
     private String fullName;
     private String phoneNumber;
+    
 
     public CustomUserFactory() {
     }
@@ -40,7 +42,15 @@
         phoneNumber = value.getPhoneNumber();
         pk = value.getPk();
     }
+	
+	@XmlTransient
+    @Override
+	public Class get_objectType() {
+		return User.class;
+	}
 
+	@XmlTransient
+	@Override
     public User getObject() {
         User user = new User();
         user.setFullName(fullName);
@@ -49,7 +59,7 @@
         user.setPk(pk);
         return user;
     }
-
+    
 
     public long getPk() {
         return pk;
@@ -82,6 +92,5 @@
     public void setPhoneNumber(String phoneNumber) {
         this.phoneNumber = phoneNumber;
     }
-
 
 }



Mime
View raw message