Skip to main content

Customer Data Management Overview

Overview

Customer data management is a critical aspect of the application, focusing on handling and manipulating customer-related information. The Customer class is central to this process, providing a structured way to manage customer data.

Customer Class

The Customer class represents customer data within the application. It includes fields such as customer number, name, address, date of birth, and credit score. These fields are used to store and retrieve customer details.


The Customer class is defined here, representing customer data within the application.

public class CUSTOMER {
protected static CobolDatatypeFactory factory = new CobolDatatypeFactory();
static { factory.setStringTrimDefault(false); }

Customer Fields

The Customer class includes several fields that store customer information. These fields are essential for managing customer data effectively.


This section shows the fields of the Customer class, including customer number, name, address, and credit score.

	protected int customerSortcode;
protected boolean customerSortcodeIsSet;
protected long customerNumber;
protected boolean customerNumberIsSet;
protected String customerName;
protected String customerAddress;
protected int customerCreditScore;
protected boolean customerCreditScoreIsSet;

Customer Methods

The Customer class provides methods to get and set the fields, allowing for the manipulation of customer data. These methods ensure that the data is correctly formatted and aligned.


The getCustomerNumber method is used to retrieve the customer number.

	public long getCustomerNumber() {
if (!customerNumberIsSet) {
customerNumber = CUSTOMER_NUMBER.getLong(byteBuffer);
customerNumberIsSet = true;
}
return customerNumber;
}


The setCustomerNumber method is used to set the customer number.

	public void setCustomerNumber(long customerNumber) {
if (customerNumberIsSet && CUSTOMER_NUMBER.equals(this.customerNumber, customerNumber)) {
return;
}
CUSTOMER_NUMBER.putLong(customerNumber, byteBuffer);
this.customerNumber = customerNumber;
customerNumberIsSet = true;
}


The getCustomerName method is used to retrieve the customer name.

	public String getCustomerName() {
if (customerName == null) {
customerName = CUSTOMER_NAME.getString(byteBuffer);
}
return customerName;
}


The setCustomerName method is used to set the customer name.

	public void setCustomerName(String customerName) {
if (CUSTOMER_NAME.equals(this.customerName, customerName)) {
return;
}
CUSTOMER_NAME.putString(customerName, byteBuffer);
this.customerName = customerName;
}

 

This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human