db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles-Alexandre Sabourdin <kan...@dedaletechnology.com>
Subject Interface and Static problemes
Date Fri, 12 Dec 2003 10:47:29 GMT
Hello,
In order to allow my project to use Torque or not, I was willing to add 
Interfaces for my Torque generated class 
for exemple :

public interface Login {
	public String getLogin(){;
}

public class Table1 implements Login {
	public String getLogin(){
		return this.login;
	};
}


public interface LoginRetriver {
	public List getLogins() throws RetriveException;
}

public class Table1Peer implements LoginRetriver {
	public List getLogins() trows RetrivingException{
		try{
	            Criteria c = new Criteria();
	            List l = Table1Peer doSelect(c);            
 	        }catch(TorqueException te){
  	          throw new RetrivingException(te.getMessage());
   	     }       
	};
}

1. I cannot define getLogins() has static, which force me to do List l =(new 
Table1Peer().getLogins();

2. I have probleme with methode that throws TorqueException, because I cannont 
override then with RetrivingException, because RetrivingException cannot 
extends TorqueException .

Sincerely yours
-- 
Charles-Alexandre
SABOURDIN
-----------------


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message