1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| /**
* lit les mots clés dans la classe.
* @return <var>true</var> si pas de pb, <var>false</var> sinon.
*/
private boolean read()
{
try
{
String query="select id, mot_cle from PMUserBouquetsKeywords where "
+"id_user="+id_user+" and id_bouquets="+id_bouquet;
ResultSet rs=DBRequestor.executeQuery(query);
int i=0;
while(rs.next())
{
id[i]=rs.getInt(1);
mot_cle[i++]=rs.getString(2);
}
nb_keyword=i;
return true;
}
catch(Exception e)
{
System.err.println("Problem Requesting Keywords for user with id "+this.id_user);
return false;
}
} |