diff options
author | PostgreSQL Daemon <webmaster@postgresql.org> | 2004-01-19 20:07:14 +0000 |
---|---|---|
committer | PostgreSQL Daemon <webmaster@postgresql.org> | 2004-01-19 20:07:14 +0000 |
commit | 2a9bf5b33d0b82e9f483f6a5ced9d71e1c009441 (patch) | |
tree | 8c0c38494985b8dbfd2311b5be51fa76a271ba17 /src/interfaces/jdbc/example/corba/StockItemImpl.java | |
parent | 9bd681a5220186230e0ea0f718a71af7ebe4b560 (diff) | |
download | postgresql-2a9bf5b33d0b82e9f483f6a5ced9d71e1c009441.tar.gz postgresql-2a9bf5b33d0b82e9f483f6a5ced9d71e1c009441.zip |
JDBC is now on GBorg
Diffstat (limited to 'src/interfaces/jdbc/example/corba/StockItemImpl.java')
-rw-r--r-- | src/interfaces/jdbc/example/corba/StockItemImpl.java | 208 |
1 files changed, 0 insertions, 208 deletions
diff --git a/src/interfaces/jdbc/example/corba/StockItemImpl.java b/src/interfaces/jdbc/example/corba/StockItemImpl.java deleted file mode 100644 index 4b52dc18056..00000000000 --- a/src/interfaces/jdbc/example/corba/StockItemImpl.java +++ /dev/null @@ -1,208 +0,0 @@ -package example.corba; - -import org.omg.CosNaming.*; - -/* - * This class implements the server side of the example. - * - * $PostgreSQL: pgsql/src/interfaces/jdbc/example/corba/StockItemImpl.java,v 1.4 2003/11/29 22:41:21 pgsql Exp $ - */ -public class StockItemImpl extends stock._StockItemImplBase -{ - private StockDB db; - private String instanceName; - - public StockItemImpl(String[] args, String iname) - { - super(); - try - { - db = new StockDB(); - db.connect(args[1], args[2], args[3]); - System.out.println("StockDB object " + iname + " created"); - instanceName = iname; - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - /* - * This is defined in stock.idl - * - * It sets the item to view - */ - public void fetchItem(int id) throws stock.StockException - { - try - { - db.fetchItem(id); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - - /* - * This is defined in stock.idl - * - * It sets the item to view - */ - public int newItem() throws stock.StockException - { - try - { - return db.newItem(); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public String getDescription() throws stock.StockException - { - try - { - return db.getDescription(); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public int getAvailable() throws stock.StockException - { - try - { - return db.getAvailable(); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public int getOrdered() throws stock.StockException - { - try - { - return db.getOrdered(); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public boolean isItemValid() throws stock.StockException - { - try - { - return db.isItemValid(); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public void addNewStock(int id) throws stock.StockException - { - try - { - db.addNewStock(id); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public void removeStock(int id) throws stock.StockException - { - try - { - db.removeStock(id); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is defined in stock.idl - * - * It returns the description of a Stock item - */ - public void orderStock(int id) throws stock.StockException - { - try - { - db.orderStock(id); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This returns the highest id used, hence the number of items available - */ - public int getLastID() throws stock.StockException - { - try - { - return db.getLastID(); - } - catch (Exception e) - { - throw new stock.StockException(e.toString()); - } - } - - /* - * This is used by our Dispenser - */ - public String getInstanceName() - { - return instanceName; - } -} - |