Excerpt from SQLConstants with the definition for an insert Customer statement.

COMPONENT JAVA
Applying Design Patterns to JDBC: Building a Lightweight Object-Relational Mapping Framework
Frank Sauer
Listing 2. Excerpt from SQLConstants with the definition for an insert Customer statement.


public final static String CUSTOMER_TABLE
        = “CUSTOMER”;
public final static String CUSTOMER_NO
        = “CUSTOMERNO”;
public final static String CUSTOMER_NAME
        = “CUSTOMERNAME”;
public final static
    String CUSTOMER_SINCE_DATE
        = “CUSTOMERSINCEDATE”;
public final static String CUSTOMER_ACTIVE
        = “ACTIVE”;
public final static String CUSTOMER_LOGON
        = “LOGONNAME”;
public final static String CUSTOMER_PASSWORD
        = “PASSWORD”;
public final static
    String CUSTOMER_LASTUPDATED
        = “LASTUPDATEDDATE”;
public final static String CUSTOMER_DISCOUNT
        = “DISCOUNT”;
public final static String insertCustomer =
        “insert into “ + CUSTOMER_TABLE +
        “(“ + CUSTOMER_NO + “,” +
                CUSTOMER_LOGON + “,” +
                CUSTOMER_PASSWORD +”,” +
                CUSTOMER_NAME + “,” +
                CUSTOMER_SINCE_DATE + “,” +
                CUSTOMER_ACTIVE + “,” +
                CUSTOMER_DISCOUNT + “,” +
                CUSTOMER_LASTUPDATED +
                “) values (?,?,?,?,?,?,?,?)”;
public final static String[]
  insertCustomerColumns = new String[] {
                CUSTOMER_NO,
                CUSTOMER_LOGON,
                CUSTOMER_PASSWORD,
                CUSTOMER_NAME,
                CUSTOMER_SINCE_DATE,
                CUSTOMER_ACTIVE,
                CUSTOMER_DISCOUNT,
                CUSTOMER_LASTUPDATED
    	};

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.