01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.openjpa.persistence.query.common.apps;
20:
21: import java.util.Arrays;
22: import java.util.Collection;
23: import java.util.Date;
24: import java.util.LinkedList;
25: import javax.persistence.Entity;
26: import javax.persistence.Temporal;
27: import javax.persistence.TemporalType;
28:
29: @Entity
30: public class ComplexA {
31:
32: private String stringA;
33: private int intA;
34: @Temporal(TemporalType.DATE)
35: private Date dateA;
36: private Collection bs = new LinkedList();
37:
38: public ComplexA() {
39:
40: }
41:
42: public ComplexA(String stringA, int intA, Date dateA, ComplexB[] bs) {
43: this .stringA = stringA;
44: this .intA = intA;
45: this .dateA = dateA;
46: if (bs != null)
47: this .bs.addAll(Arrays.asList(bs));
48: }
49:
50: public void setStringA(String stringA) {
51: this .stringA = stringA;
52: }
53:
54: public String getStringA() {
55: return this .stringA;
56: }
57:
58: public void setIntA(int intA) {
59: this .intA = intA;
60: }
61:
62: public int getIntA() {
63: return this .intA;
64: }
65:
66: public void setDateA(Date dateA) {
67: this .dateA = dateA;
68: }
69:
70: public Date getDateA() {
71: return this .dateA;
72: }
73:
74: public void setBs(Collection bs) {
75: this .bs = bs;
76: }
77:
78: public Collection getBs() {
79: return this.bs;
80: }
81: }
|