openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r927434 [2/2] - in /openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test: java/org/apache/openjpa/persistence/proxy/ java/org/apache/openjpa/persistence/proxy/entities/ resources/META-INF/ resources/org/apache/openjpa/persistence/proxy/
Date Thu, 25 Mar 2010 14:58:57 GMT
Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPayout.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPayout.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPayout.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPayout.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+
+public interface IPayout extends IAnnuityObject{
+
+	public void setTaxableAmount(BigDecimal taxableAmount);
+	public BigDecimal getTaxableAmount();
+	public void setStartDate(Calendar startDate);
+	public Calendar getStartDate();
+	public void setEndDate(Calendar payoutEndDate);
+	public Calendar getEndDate();
+	public IAnnuity getAnnuity();
+	public void setAnnuity(IAnnuity annuity);
+
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPayout.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPersisteble.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPersisteble.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPersisteble.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPersisteble.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+public interface IPersisteble extends Identifiable {
+
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPersisteble.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPerson.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPerson.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPerson.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPerson.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.util.Date;
+
+public interface IPerson extends IAnnuityObject {
+
+	public Date getDateOfBirth();
+
+	public void setDateOfBirth(Date dateOfBirth);
+
+	public String getFirstName();
+
+	public void setFirstName(String firstName);
+
+	public String getGovernmentId();
+
+	public void setGovernmentId(String governmentId);
+
+	public String getLastName();
+
+	public void setLastName(String lastName);
+
+	public Byte[] getPicture();
+
+	public void setPicture(Byte[] picture);
+
+	public Date getTimeOfBirth();
+
+	public void setTimeOfBirth(Date timeOfBirth);	
+	
+	public IContact getContact();
+	
+	public void setContact(IContact contact);
+	
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IPerson.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IRider.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IRider.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IRider.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IRider.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.util.Date;
+
+public interface IRider extends IAnnuityObject {
+    
+	public Date getEffectiveDate();
+	
+	public void setEffectiveDate(Date date);
+	
+	public String getRule();
+
+	public void setRule(String rule);
+
+	public RiderType getType();
+
+	public void setType(RiderType type);
+	
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/IRider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Identifiable.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Identifiable.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Identifiable.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Identifiable.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.io.Serializable;
+
+public interface Identifiable extends Configrable<String, String>, Serializable{
+	public String getId();
+	public void setId(String id);	
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Identifiable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/JPAPersisteble.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/JPAPersisteble.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/JPAPersisteble.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/JPAPersisteble.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+public interface JPAPersisteble extends IPersisteble, Identifiable, Configrable<String,
String>{
+
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/JPAPersisteble.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Parameterizable.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Parameterizable.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Parameterizable.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Parameterizable.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.io.Serializable;
+import java.util.Map;
+
+public interface Parameterizable <K,V> extends Serializable{
+	public void addParameter(K key, V value);
+	public void removeParameter(K key);
+	public void clearAllParameters();
+	public Map<K, V> getParameters();
+	public V getParameterValue(K key);
+	public void addAllParams(Map<K,V> newParams);
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Parameterizable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payor.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payor.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payor.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payor.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+
+@Entity
+@AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_TS"))
+public class Payor extends AnnuityPersistebleObject implements IPayor {	
+	private static final long serialVersionUID = 3462390122289537362L;
+	private String name;	
+	
+	@Column(name="NAME")
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payout.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payout.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payout.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payout.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.util.Calendar;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+
+@Entity
+@AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_TS"))
+public class Payout extends AnnuityPersistebleObject implements IPayout {	
+	private static final long serialVersionUID = 2837981324963617180L;
+	private BigDecimal taxableAmount;
+	private Calendar startDate;
+	private Calendar endDate;
+	private IAnnuity annuity;
+		
+	@Column(name="TAXABLE_AMOUNT")
+	public BigDecimal getTaxableAmount() {		
+		return this.taxableAmount;
+	}
+	public void setTaxableAmount(BigDecimal payoutTaxableAmt) {		
+		this.taxableAmount = payoutTaxableAmt;
+		if (payoutTaxableAmt != null) {
+			DecimalFormat df = new DecimalFormat("#.##");
+			this.taxableAmount = new BigDecimal(df.format(payoutTaxableAmt)); 				
+		}
+		
+	}
+	@Column(name="START_DATE")
+	public Calendar getStartDate() {
+		return startDate;
+	}
+	public void setStartDate(Calendar startDate) {
+		this.startDate = startDate;
+	}
+	
+	@Column(name="END_DATE")
+	public Calendar getEndDate() {
+		return endDate;
+	}
+	
+	public void setEndDate(Calendar payoutEndDate) {
+		this.endDate = payoutEndDate;
+	}
+			
+	@ManyToOne(targetEntity=Annuity.class,
+			fetch=FetchType.EAGER)
+	@JoinColumn(name="FK_ANNUITY_ID")	
+	public IAnnuity getAnnuity() {
+		return this.annuity;
+	}
+	public void setAnnuity(IAnnuity annuity) {
+		this.annuity = annuity;
+		
+	}
+
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Payout.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Person.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Person.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Person.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Person.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.util.Date;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
+import javax.persistence.OneToOne;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@Entity
+@Inheritance(strategy=InheritanceType.JOINED)
+@AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_TS"))
+public class Person extends AnnuityPersistebleObject implements IPerson {
+
+	private static final long serialVersionUID = 6583119146735692154L;
+	private String firstName;
+	private String lastName;
+	private String governmentId;
+	private Date dateOfBirth;
+	private Date timeOfBirth;
+	private Byte[] picture;
+	private IContact contact;
+	
+	
+	@Column(name="DATE_OF_BIRTH")
+	@Temporal(TemporalType.DATE)
+	public Date getDateOfBirth() {
+		return dateOfBirth;
+	}
+	public void setDateOfBirth(Date dateOfBirth) {
+		this.dateOfBirth = dateOfBirth;
+	}
+	@Column(name="FIRST_NAME")
+	public String getFirstName() {
+		return firstName;
+	}
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
+	@Column(name="GOVERNMENT_ID")
+	public String getGovernmentId() {
+		return governmentId;
+	}
+	public void setGovernmentId(String governmentId) {
+		this.governmentId = governmentId;
+	}
+	@Column(name="LAST_NAME")
+	public String getLastName() {
+		return lastName;
+	}
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+	@Column(name="PICTURE")
+	@Lob	
+	public Byte[] getPicture() {
+		return picture;
+	}
+	public void setPicture(Byte[] picture) {
+		this.picture = picture;
+	}
+	@Column(name="TIME_OF_BIRTH")
+	@Temporal(TemporalType.TIME)
+	public Date getTimeOfBirth() {
+		return timeOfBirth;
+	}
+	public void setTimeOfBirth(Date timeOfBirth) {
+		this.timeOfBirth = timeOfBirth;
+	}
+	
+	@OneToOne(
+			cascade={CascadeType.REFRESH, CascadeType.MERGE}, 
+			targetEntity=Contact.class)
+	@JoinColumn(name="FK_CONTACT_ID")	
+	public IContact getContact() {
+		return this.contact;
+	}
+	public void setContact(IContact contact) {
+		this.contact = contact;
+	}
+	
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.util.Date;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+
+@Entity
+@AttributeOverride(name="lastUpdateDate", column=@Column(name="LAST_UPDATE_TS"))
+public class Rider extends AnnuityPersistebleObject implements IRider {
+	private static final long serialVersionUID = 2088116709551706187L;
+
+	private String rule;
+	private Date effectiveDate;
+	private RiderType type;
+	
+	@Column(name="EFFECTIVE_DATE")
+	public Date getEffectiveDate() {
+		return effectiveDate;
+	}
+	public void setEffectiveDate(Date effectiveDate) {
+		this.effectiveDate = effectiveDate;
+	}
+	public String getRule() {
+		return rule;
+	}
+	public void setRule(String rule) {
+		this.rule = rule;
+	}
+	
+	@Enumerated(EnumType.STRING)	
+	public RiderType getType() {
+		return type;
+	}
+	public void setType(RiderType type) {
+		this.type = type;
+	}
+	
+
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/Rider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/RiderType.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/RiderType.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/RiderType.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/RiderType.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+public enum RiderType {
+	REPLACE, OVERRIDE;
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/RiderType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/StringParameterizable.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/StringParameterizable.java?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/StringParameterizable.java
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/StringParameterizable.java
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.openjpa.persistence.proxy.entities;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class StringParameterizable implements Parameterizable<String, String> {
+	private static final long serialVersionUID = -4289064323865338447L;
+	private Map<String, String> params = new HashMap<String, String>();
+	
+	public void addParameter(String key, String value) {
+		this.params.put(key, value);
+	}
+
+	public Map<String, String> getParameters() {
+		return this.params;
+	}
+
+	public void removeParameter(String key) {
+		this.params.remove(key);
+	}
+
+	public void clearAllParameters() {
+		this.params.clear();
+	}
+
+	public String getParameterValue(String key) {
+		return this.params.get(key);
+	}
+	
+	public void addAllParams(Map<String, String> newParams) {
+		if (newParams != null) {
+			params.putAll(newParams);
+		}
+	}
+}

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/proxy/entities/StringParameterizable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml?rev=927434&r1=927433&r2=927434&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
(original)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
Thu Mar 25 14:58:56 2010
@@ -341,4 +341,28 @@
         </properties>
     </persistence-unit>
 
+    <persistence-unit name="TestDetachMerge">
+        <class>org.apache.openjpa.persistence.proxy.entities.Address</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Annuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityHolder</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityPersistebleObject</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Contact</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.EquityAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.FixedAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payor</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payout</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Person</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Rider</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings"
+                value="buildSchema(ForeignKeys=true)"/>
+            <!--
+            <property name="openjpa.DetachState"
+                value="fgs(DetachedStateField=true)" />
+            <property name="openjpa.jdbc.Schema" value="EJB30" />
+            -->
+        </properties>
+    </persistence-unit>
+
 </persistence>

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence1.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence1.xml?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence1.xml
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence1.xml
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    version="1.0"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+
+    <persistence-unit name="Annuity1Compat">
+        <class>org.apache.openjpa.persistence.proxy.entities.Address</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Annuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityHolder</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityPersistebleObject</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Contact</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.EquityAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.FixedAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payor</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payout</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Person</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Rider</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+        <properties>			
+            <property name="openjpa.DetachState" value="fgs(DetachedStateField=true)"
/>
+            <!-- <property name="openjpa.jdbc.Schema" value="EJB30"/> -->
+            <property name="openjpa.jdbc.SynchronizeMappings"
+                value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+</persistence>

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence2.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence2.xml?rev=927434&view=auto
==============================================================================
--- openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence2.xml
(added)
+++ openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence2.xml
Thu Mar 25 14:58:56 2010
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    version="2.0"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
+    http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+
+    <!-- 
+         This is the original PU from 1.0, but running as a 2.0 app
+    -->
+    <persistence-unit name="Annuity2Fail">
+        <class>org.apache.openjpa.persistence.proxy.entities.Address</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Annuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityHolder</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityPersistebleObject</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Contact</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.EquityAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.FixedAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payor</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payout</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Person</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Rider</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+        <properties>			
+            <property name="openjpa.DetachState" value="fgs(DetachedStateField=true)"
/>
+            <!-- <property name="openjpa.jdbc.Schema" value="EJB30"/> -->
+            <property name="openjpa.jdbc.SynchronizeMappings"
+                value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+
+    <!--
+         This is the original PU from 1.0, but with the DetachedStateField
+         override removed, which will cause a transient one to be used
+         and the tests will pass.
+    -->
+    <persistence-unit name="Annuity2New">
+        <class>org.apache.openjpa.persistence.proxy.entities.Address</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Annuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityHolder</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityPersistebleObject</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Contact</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.EquityAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.FixedAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payor</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payout</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Person</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Rider</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+        <properties>			
+            <!-- <property name="openjpa.DetachState" value="fgs(DetachedStateField=true)"
/> -->
+            <!-- <property name="openjpa.jdbc.Schema" value="EJB30"/> -->
+            <property name="openjpa.jdbc.SynchronizeMappings"
+                value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+
+    <!-- 
+         This is the original PU from 1.0, but running as a 2.0 app
+         with the new Compatibility flag set to use the old 1.0 behavior,
+         so the tests will pass.
+    -->
+    <persistence-unit name="Annuity2Compat">
+        <class>org.apache.openjpa.persistence.proxy.entities.Address</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Annuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityHolder</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.AnnuityPersistebleObject</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Contact</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.EquityAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.FixedAnnuity</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payor</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Payout</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Person</class>
+        <class>org.apache.openjpa.persistence.proxy.entities.Rider</class>
+        <exclude-unlisted-classes>true</exclude-unlisted-classes>
+        <properties>			
+            <!-- <property name="openjpa.Compatibility.xxxxx" value="true)" /> -->
+            <property name="openjpa.DetachState" value="fgs(DetachedStateField=true)"
/>
+            <!-- <property name="openjpa.jdbc.Schema" value="EJB30"/> -->
+            <property name="openjpa.jdbc.SynchronizeMappings"
+                value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+</persistence>

Propchange: openjpa/branches/2.0.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/proxy/persistence2.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message