org.davesag.generica.peer
Class CreditCardPeer

java.lang.Object
  extended byorg.davesag.generica.peer.CreditCardPeer

public class CreditCardPeer
extends Object

This peer manipulates CreditCard s using hibernate.

Since:
Generica 1.0
Version:
CVS Revision $Id: CreditCardPeer.java,v 1.13 2004/04/06 15:40:41 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Constructor Summary
CreditCardPeer()
           
 
Method Summary
static void delete(Session sess, CreditCard card)
          Delete this credit card.
static boolean exists(Session sess, String num)
          A quick tests to determine if the number supplied matched a known credit card number.
static Long save(Session sess, CreditCard card)
          Save this credit card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreditCardPeer

public CreditCardPeer()
Method Detail

save

public static Long save(Session sess,
                        CreditCard card)
Save this credit card.

Parameters:
sess - The Session to use to save the credit card. The session will be flushed but not closed.
card - The credit card.
Returns:
The ID of the saved credit card, or null if there was an error.

delete

public static void delete(Session sess,
                          CreditCard card)
Delete this credit card.

Parameters:
sess - The Session to use to delete the credit card. The session will be flushed but not closed.
card - The credit card.

exists

public static boolean exists(Session sess,
                             String num)
A quick tests to determine if the number supplied matched a known credit card number.

Parameters:
sess - The Session to use to query for the card.
num - The credit card number to test.
Returns:
true if the name supplied corresponds to a known card number.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.