[sip-comm-dev] First draft of interface and implementation of database bundle


#1

Hi all,

Attached here is the first draft of the database bundle (interface and
implementation) I am implementing as part of my GSoC project.

Kindly review it and post your valuable suggestions

Regards

Ajay

dbbundle.zip (7.39 KB)


#2

Hi Ajay,

Few comments about your implementation :
- don't forget to use "this" when you use a class var
- in the getExistingTableNames method, you use a Vector, which is
deprecated. Since you return a List, try using a ArrayList.
- Don't forget to check the input of the user (call
executePreparedStatement before prepareStatement, ...)

Otherwise it good !

Bye

Damien

···

2009/5/23 AJAY CHHATWAL <ajay.chhatwal.cse07@itbhu.ac.in>:

Hi all,

Attached here is the first draft of the database bundle (interface and
implementation) I am implementing as part of my GSoC project.

Kindly review it and post your valuable suggestions

Regards

Ajay

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Damien

Thanks a lot for your comments....I'll act on your suggestions and
modify the implementation accordingly.

Regards

Ajay

···

On Sun, May 24, 2009 at 2:32 PM, Damien Roth <damien.roth@gmail.com> wrote:

Hi Ajay,

Few comments about your implementation :
- don't forget to use "this" when you use a class var
- in the getExistingTableNames method, you use a Vector, which is
deprecated. Since you return a List, try using a ArrayList.
- Don't forget to check the input of the user (call
executePreparedStatement before prepareStatement, ...)

Otherwise it good !

Bye

Damien

2009/5/23 AJAY CHHATWAL <ajay.chhatwal.cse07@itbhu.ac.in>:

Hi all,

Attached here is the first draft of the database bundle (interface and
implementation) I am implementing as part of my GSoC project.

Kindly review it and post your valuable suggestions

Regards

Ajay

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi,

Some information for those how are a little surprised by the "deprecated".

- in the getExistingTableNames method, you use a Vector, which is
deprecated. Since you return a List, try using a ArrayList.

Actually, it's not really deprecated but it's strongly recommended by
Sun not to use it
Link : http://java.sun.com/developer/onlineTraining/collections/Collection.html#VectorAndStackClasses

Another point, for the java 5 api

As of the Java 2 platform v1.2, this class has been retrofitted to implement List,
so that it becomes a part of Java's collection framework.
Unlike the new collection implementations, Vector is synchronized.

Synchronization isn't really needed in this case, so ArrayList is
better for the performances (even a little)

Bye

Damien

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi Ajay,

Eclipse helps me "spot" all the deprecated methods. I guess other
editors do so too (NetBeans, IntelliJ IDEA), so if you're after
convenience, grab one of those.

If you already have one of those, you just have to pay attention to
the warnings list :wink:

···

On Mon, May 25, 2009 at 7:18 PM, Damien Roth <damien.roth@gmail.com> wrote:

Hi,

Some information for those how are a little surprised by the "deprecated".

- in the getExistingTableNames method, you use a Vector, which is
deprecated. Since you return a List, try using a ArrayList.

Actually, it's not really deprecated but it's strongly recommended by
Sun not to use it
Link : http://java.sun.com/developer/onlineTraining/collections/Collection.html#VectorAndStackClasses

Another point, for the java 5 api

As of the Java 2 platform v1.2, this class has been retrofitted to implement List,
so that it becomes a part of Java's collection framework.
Unlike the new collection implementations, Vector is synchronized.

Synchronization isn't really needed in this case, so ArrayList is
better for the performances (even a little)

Bye

Damien

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

Hi George

Thanks for your advice but I already know how use Netbeans IDE to
"spot" all the deprecated methods.

Actually,Vectors are not deprecated (see previous post) and the reason
I was using vectors was that the original implementation of the
HistoryService uses vectors....Anyways I have changed that and also a
lot of other things...You can download the new and modified version of
the database bundle from my other post to this list.

Regards

Ajay

···

On Wed, May 27, 2009 at 7:22 AM, Geekius Caesar <geekius.caesar@gmail.com> wrote:

Hi Ajay,

Eclipse helps me "spot" all the deprecated methods. I guess other
editors do so too (NetBeans, IntelliJ IDEA), so if you're after
convenience, grab one of those.

If you already have one of those, you just have to pay attention to
the warnings list :wink:

On Mon, May 25, 2009 at 7:18 PM, Damien Roth <damien.roth@gmail.com> wrote:

Hi,

Some information for those how are a little surprised by the "deprecated".

- in the getExistingTableNames method, you use a Vector, which is
deprecated. Since you return a List, try using a ArrayList.

Actually, it's not really deprecated but it's strongly recommended by
Sun not to use it
Link : http://java.sun.com/developer/onlineTraining/collections/Collection.html#VectorAndStackClasses

Another point, for the java 5 api

As of the Java 2 platform v1.2, this class has been retrofitted to implement List,
so that it becomes a part of Java's collection framework.
Unlike the new collection implementations, Vector is synchronized.

Synchronization isn't really needed in this case, so ArrayList is
better for the performances (even a little)

Bye

Damien

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net