Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 852725 Details for
Bug 1055515
BPMN 2 editor : Adding a new data type leads to validation errors
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Applicant.java
Applicant.java (text/plain), 4.04 KB, created by
Keith Babo
on 2014-01-20 13:16:08 UTC
(
hide
)
Description:
Applicant.java
Filename:
MIME Type:
Creator:
Keith Babo
Created:
2014-01-20 13:16:08 UTC
Size:
4.04 KB
patch
obsolete
>package org.jboss.example.homeloan.data; > >import java.io.Serializable; >import java.util.Calendar; >import java.util.Date; > >public class Applicant implements Serializable { > private static final long serialVersionUID = 1L; > > private Date dob; > private int creditScore; > private String firstName = ""; > private String lastName = ""; > private String ssn; > private String streetAddress; > private String postalCode; > private String city; > private String state; > private double checkingBalance; > private double savingsBalance; > > /** > * @return the calculated age from the DOB > */ > public int getAge() { > > final Calendar dob = Calendar.getInstance(); > dob.setTime(getDob()); > final Calendar now = Calendar.getInstance(); > > int age = now.get(Calendar.YEAR) - dob.get(Calendar.YEAR); > > // IF THE CURRENT MONTH IS LESS THAN THE DOB MONTH > // THEN REDUCE THE DOB BY 1 AS THEY HAVE NOT HAD THEIR > // BIRTHDAY YET THIS YEAR > if (now.get(Calendar.MONTH) < dob.get(Calendar.MONTH)) { > age = age - 1; > } > > // IF THE MONTH IN THE DOB IS EQUAL TO THE CURRENT MONTH > // THEN CHECK THE DAY TO FIND OUT IF THEY HAVE HAD THEIR > // BIRTHDAY YET. IF THE CURRENT DAY IS LESS THAN THE DAY OF THE DOB > // THEN REDUCE THE DOB BY 1 AS THEY HAVE NOT HAD THEIR > // BIRTHDAY YET THIS YEAR > if ((now.get(Calendar.MONTH) == dob.get(Calendar.MONTH)) && (now.get(Calendar.DATE) < dob.get(Calendar.DATE))) { > age = age - 1; > } > > // THE AGE VARIBALE WILL NOW CONTAIN THE CORRECT AGE > // DERIVED FROMTHE GIVEN DOB > > return age; > } > > /** > * @return the dob > */ > public Date getDob() { > return dob; > } > > /** > * @param dob > * the dob to set > */ > public void setDob(final Date dob) { > this.dob = dob; > } > > /** > * @return the creditScore > */ > public int getCreditScore() { > return creditScore; > } > > /** > * @param creditScore > * the creditScore to set > */ > public void setCreditScore(final int creditScore) { > this.creditScore = creditScore; > } > > /** > * @return first name > */ > public String getFirstName() { > return firstName; > } > > /** > * @param firstName > * the name to set > */ > public void setFirstName(final String firstName) { > this.firstName = firstName; > } > > /** > * @return last name > */ > public String getLastName() { > return lastName; > } > > /** > * @param lastName > * the name to set > */ > public void setLastName(final String lastName) { > this.lastName = lastName; > } > > > > public String getStreetAddress() { > return streetAddress; > } > > public void setStreetAddress(String streetAddress) { > this.streetAddress = streetAddress; > } > > public String getPostalCode() { > return postalCode; > } > > public void setPostalCode(String postalCode) { > this.postalCode = postalCode; > } > > public String getCity() { > return city; > } > > public void setCity(String city) { > this.city = city; > } > > public String getState() { > return state; > } > > public void setState(String state) { > this.state = state; > } > > public double getCheckingBalance() { > return checkingBalance; > } > > public void setCheckingBalance(double checkingBalance) { > this.checkingBalance = checkingBalance; > } > > > public double getSavingsBalance() { > return savingsBalance; > } > > public void setSavingsBalance(double savingsBalance) { > this.savingsBalance = savingsBalance; > } > > /* > * (non-Javadoc) > * > * @see java.lang.Object#toString() > */ > @Override > public String toString() { > return this.getClass().getSimpleName() + ": Name=" + getFirstName() + " " + getLastName() > + " Age=" + getAge() + " CreditScore=" + creditScore + " StreetAddress=" > + streetAddress + " SSN=" + ssn; > } > > > public String getSsn() { > return ssn; > } > > > public void setSsn(String ssn) { > this.ssn = ssn; > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1055515
: 852725