Code example for Connection

Methods: prepareStatement

0
		PreparedStatement ps = null;
 
		try { 
			con = DataAccess.getConnection();
 
			ps = con.prepareStatement(
				"update PortletPreferences set preferences = ? where " + 
					"portletPreferencesId = " + portletPreferencesId);
 
			ps.setString(1, preferences);
 
			ps.executeUpdate();
		} 
		finally { 
			DataAccess.cleanUp(con, ps);
		} 
	} 
 
	protected abstract String upgradePreferences(
			long companyId, long ownerId, int ownerType, long plid,
Contextual code suggestions in your IDE  Get Codota for Java