reversing class to static as no other call except

from Posterita (as Mathias recommended in SF/Posterita)
This commit is contained in:
Redhuan D. Oon 2007-06-25 17:02:25 +00:00
parent e1e391eebf
commit 96b1d136c2
1 changed files with 3 additions and 3 deletions

View File

@ -36,18 +36,18 @@ public class MBPartnerLocation extends X_C_BPartner_Location
* @param C_BPartner_ID bp * @param C_BPartner_ID bp
* @return array of locations * @return array of locations
*/ */
public MBPartnerLocation[] getForBPartner (Properties ctx, int C_BPartner_ID) public static MBPartnerLocation[] getForBPartner (Properties ctx, int C_BPartner_ID)
{ {
ArrayList<MBPartnerLocation> list = new ArrayList<MBPartnerLocation>(); ArrayList<MBPartnerLocation> list = new ArrayList<MBPartnerLocation>();
String sql = "SELECT * FROM C_BPartner_Location WHERE C_BPartner_ID=?"; String sql = "SELECT * FROM C_BPartner_Location WHERE C_BPartner_ID=?";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
try try
{ {
pstmt = DB.prepareStatement (sql, trxName); pstmt = DB.prepareStatement (sql, null);
pstmt.setInt (1, C_BPartner_ID); pstmt.setInt (1, C_BPartner_ID);
ResultSet rs = pstmt.executeQuery (); ResultSet rs = pstmt.executeQuery ();
while (rs.next ()) while (rs.next ())
list.add(new MBPartnerLocation(ctx, rs, trxName)); list.add(new MBPartnerLocation(ctx, rs, null));
rs.close (); rs.close ();
pstmt.close (); pstmt.close ();
pstmt = null; pstmt = null;