1 package com.daffodilwoods.rmi; 2 3 import java.rmi.*; 4 import java.util.*; 5 6 import com.daffodilwoods.daffodildb.server.datadictionarysystem.information.*; 7 import com.daffodilwoods.database.general.*; 8 import com.daffodilwoods.database.resource.*; 9 import com.daffodilwoods.rmi.interfaces.*; 10 11 public class RmiDatabaseInformation 12 implements _DatabaseInformation { 13 14 _RmiDatabaseInformation databaseInformation_interface; 15 16 public RmiDatabaseInformation(_RmiDatabaseInformation 17 databaseInformation_interface) { 18 this.databaseInformation_interface = databaseInformation_interface; 19 } 20 21 public ArrayList getAllTables() { 22 try { 23 return databaseInformation_interface.getAllTables(); 24 } 25 catch (RemoteException re) { 26 throw new RuntimeException (re.getMessage()); 27 } 28 } 29 30 public ArrayList getAllRoles() { 31 try { 32 return databaseInformation_interface.getAllRoles(); 33 } 34 catch (RemoteException re) { 35 throw new RuntimeException (re.getMessage()); 36 } 37 } 38 39 public ArrayList getAllProcedures() { 40 try { 41 return databaseInformation_interface.getAllProcedures(); 42 } 43 catch (RemoteException re) { 44 throw new RuntimeException (re.getMessage()); 45 } 46 } 47 48 public ArrayList getAllViews() { 49 try { 50 return databaseInformation_interface.getAllViews(); 51 } 52 catch (RemoteException re) { 53 throw new RuntimeException (re.getMessage()); 54 } 55 } 56 57 public ArrayList getAllSessions() { 58 try { 59 return databaseInformation_interface.getAllSessions(); 60 } 61 catch (RemoteException re) { 62 throw new RuntimeException (re.getMessage()); 63 } 64 } 65 66 public _TableInformation getTableInformation(QualifiedIdentifier tableName) { 67 try { 68 return new RmiTableInformation(databaseInformation_interface. 69 getTableInformation(tableName)); 70 } 71 catch (RemoteException re) { 72 throw new RuntimeException (re.getMessage()); 73 } 74 } 75 76 public _RoleInformation getRoleInformation(String roleName) { 77 try { 78 return databaseInformation_interface.getRoleInformation(roleName); 79 } 80 catch (RemoteException re) { 81 throw new RuntimeException (re.getMessage()); 82 } 83 } 84 85 public _ViewInformation getViewInformation(QualifiedIdentifier viewName) { 86 try { 87 return databaseInformation_interface.getViewInformation(viewName); 88 } 89 catch (RemoteException re) { 90 throw new RuntimeException (re.getMessage()); 91 } 92 } 93 94 public _SessionInformation getSessionInformation(Object sessionName) { 95 try { 96 return databaseInformation_interface.getSessionInformation(sessionName); 97 } 98 catch (RemoteException re) { 99 throw new RuntimeException (re.getMessage()); 100 } 101 } 102 103 public _ProcedureInformation getProcedureInformation(QualifiedIdentifier 104 procedureName) { 105 try { 106 if (databaseInformation_interface == null) 107 ; return databaseInformation_interface.getProcedureInformation( 109 procedureName); 110 } 111 catch (RemoteException re) { 112 throw new RuntimeException (re.getMessage()); 113 } 114 } 115 116 public void refresh() { 117 try { 118 databaseInformation_interface.refresh(); 119 } 120 catch (RemoteException re) { 121 throw new RuntimeException (re.getMessage()); 122 } 123 } 124 125 public void refresh(int property) { 126 try { 127 databaseInformation_interface.refresh(property); 128 } 129 catch (RemoteException re) { 130 throw new RuntimeException (re.getMessage()); 131 } 132 } 133 134 public ArrayList getAllUsers() { 135 try { 136 return databaseInformation_interface.getAllUsers(); 137 } 138 catch (RemoteException re) { 139 throw new RuntimeException (re.getMessage()); 140 } 141 } 142 143 public _UserInformation getUsersInformation(String userName) { 144 try { 145 return databaseInformation_interface.getUsersInformation(userName); 146 } 147 catch (RemoteException re) { 148 throw new RuntimeException (re.getMessage()); 149 } 150 } 151 152 public void close() throws DException { 153 try { 154 databaseInformation_interface.close(); 155 } 156 catch (RemoteException re) { 157 throw new RuntimeException (re.getMessage()); 158 } 159 } 160 } 161 | Popular Tags |