summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:07:28 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:07:28 +0000
commit07b7dfd1a70ba222b899d9813f8c449dbf3b785f (patch)
treeecfc876747e6cfedee0a8533d87c19ac78a2dbd0 /sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata
parent6fadbc9cd1fcf03d0b3630f772d91df149b70428 (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835124 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata')
-rw-r--r--sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java33
-rw-r--r--sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java57
-rw-r--r--sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java50
-rw-r--r--sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java50
-rw-r--r--sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java59
5 files changed, 249 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java
new file mode 100644
index 0000000000..02f4d0e7b6
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataService.java
@@ -0,0 +1,33 @@
+/*
+ * 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 bigbank.accountdata;
+
+/**
+ * @version $$Rev$$ $$Date$$
+ */
+
+public interface AccountDataService {
+
+ public CheckingAccount getCheckingAccount(String customerID);
+
+ public SavingsAccount getSavingsAccount(String customerID);
+
+ public StockAccount getStockAccount(String customerID);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
new file mode 100644
index 0000000000..2e1290aa5f
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/AccountDataServiceImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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 bigbank.accountdata;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * @version $$Rev$$ $$Date$$
+ */
+
+@Service(AccountDataService.class)
+public class AccountDataServiceImpl implements AccountDataService {
+
+ public CheckingAccount getCheckingAccount(String customerID) {
+
+ CheckingAccount checkingAccount = new CheckingAccount();
+ checkingAccount.setAccountNumber("CHA_" + customerID);
+ checkingAccount.setBalance(500.0f);
+
+ return checkingAccount;
+ }
+
+ public SavingsAccount getSavingsAccount(String customerID) {
+
+ SavingsAccount savingsAccount = new SavingsAccount();
+ savingsAccount.setAccountNumber("SAA_" + customerID);
+ savingsAccount.setBalance(1500.0f);
+
+ return savingsAccount;
+ }
+
+ public StockAccount getStockAccount(String customerID) {
+
+ StockAccount stockAccount = new StockAccount();
+ stockAccount.setAccountNumber("STA_" + customerID);
+ stockAccount.setSymbol("IBM");
+ stockAccount.setQuantity(100);
+
+ return stockAccount;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java
new file mode 100644
index 0000000000..c53d8b4576
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/CheckingAccount.java
@@ -0,0 +1,50 @@
+/*
+ * 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 bigbank.accountdata;
+
+/**
+ * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr
+ * 2007) $$
+ */
+
+public class CheckingAccount {
+ private String accountNumber;
+ private double balance;
+
+ public String getAccountNumber() {
+ return accountNumber;
+ }
+
+ public void setAccountNumber(String n) {
+ this.accountNumber = n;
+ }
+
+ public double getBalance() {
+ return balance;
+ }
+
+ public void setBalance(double b) {
+ this.balance = b;
+ }
+
+ @Override
+ public String toString() {
+ return accountNumber + ", balance:" + balance;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java
new file mode 100644
index 0000000000..f4c7442f30
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/SavingsAccount.java
@@ -0,0 +1,50 @@
+/*
+ * 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 bigbank.accountdata;
+
+/**
+ * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr
+ * 2007) $$
+ */
+
+public class SavingsAccount {
+ private String accountNumber;
+ private double balance;
+
+ public String getAccountNumber() {
+ return accountNumber;
+ }
+
+ public void setAccountNumber(String n) {
+ this.accountNumber = n;
+ }
+
+ public double getBalance() {
+ return balance;
+ }
+
+ public void setBalance(double b) {
+ this.balance = b;
+ }
+
+ @Override
+ public String toString() {
+ return accountNumber + ", balance:" + balance;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java
new file mode 100644
index 0000000000..c28e0b59a7
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.1/demos/bigbank-account/src/main/java/bigbank/accountdata/StockAccount.java
@@ -0,0 +1,59 @@
+/*
+ * 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 bigbank.accountdata;
+
+/**
+ * @version $$Rev$$ $$Date: 2007-04-09 12:03:34 -0700 (Mon, 09 Apr
+ * 2007) $$
+ */
+
+public class StockAccount {
+ private String accountNumber;
+ private String symbol;
+ private int quantity;
+
+ public String getAccountNumber() {
+ return accountNumber;
+ }
+
+ public void setAccountNumber(String n) {
+ this.accountNumber = n;
+ }
+
+ public double getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(int a) {
+ this.quantity = a;
+ }
+
+ public String getSymbol() {
+ return symbol;
+ }
+
+ public void setSymbol(String s) {
+ this.symbol = s;
+ }
+
+ @Override
+ public String toString() {
+ return accountNumber + ", symbol:" + symbol + ", quantity:" + quantity;
+ }
+}