Introduced Login Manager logic by creating the LoginManager and the LoginManagerInterface
[RRRRHHHH_Code] / ruralHouses / src / dataAccess / DB4oManager.java
index 0049a4e..8388435 100644 (file)
@@ -85,7 +85,23 @@ public class DB4oManager {
                        //db.close();
                }
        } 
+       
+       public Vector<Owner> getSingleOwner(String usr, String pwd) throws RemoteException,
+       Exception {
+               ObjectContainer db=DB4oManager.getContainer();
 
+               try {
+                       Owner proto = new Owner(null,usr,pwd,null);
+                       ObjectSet result = db.queryByExample(proto);
+                       Vector<Owner> owners=new Vector<Owner>();
+                       while(result.hasNext())                          
+                               owners.add((Owner)result.next());
+                       return owners;
+               } finally {
+                       //db.close();
+               }
+       }
+       
        public Vector<RuralHouse> getAllRuralHouses() throws RemoteException,
        Exception {
                ObjectContainer db=DB4oManager.getContainer();