diff --git a/AccountHibernate/.classpath b/AccountHibernate/.classpath new file mode 100644 index 0000000..f8c90ba --- /dev/null +++ b/AccountHibernate/.classpath @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AccountHibernate/.project b/AccountHibernate/.project new file mode 100644 index 0000000..b589896 --- /dev/null +++ b/AccountHibernate/.project @@ -0,0 +1,23 @@ + + + AccountHibernate + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/AccountHibernate/.settings/org.eclipse.core.resources.prefs b/AccountHibernate/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..4c28b1a --- /dev/null +++ b/AccountHibernate/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/AccountHibernate/.settings/org.eclipse.jdt.core.prefs b/AccountHibernate/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..fbcdb7f --- /dev/null +++ b/AccountHibernate/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/AccountHibernate/.settings/org.eclipse.m2e.core.prefs b/AccountHibernate/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..14b697b --- /dev/null +++ b/AccountHibernate/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/AccountHibernate/pom.xml b/AccountHibernate/pom.xml new file mode 100644 index 0000000..0163520 --- /dev/null +++ b/AccountHibernate/pom.xml @@ -0,0 +1,88 @@ + + + + 4.0.0 + + com.hibernate.rest + AccountHibernate + 0.0.1-SNAPSHOT + + AccountHibernate + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + org.hibernate + hibernate-core + 4.1.1.Final + + + + mysql + mysql-connector-java + 5.1.34 + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/AccountResource.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/AccountResource.java new file mode 100644 index 0000000..e37bc63 --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/AccountResource.java @@ -0,0 +1,29 @@ +package com.hibernate.rest.AccountHibernate; + +import com.hibernate.rest.AccountHibernate.dao.PersonalInfoDAO; +import com.hibernate.rest.AccountHibernate.dao.PersonalInfoDAOImpl; +import com.hibernate.rest.AccountHibernate.validation.AccountValidationException; +import com.hibernate.rest.AccountHibernate.vo.PersonalInfo; + +/** + * Hello world! + * + */ +public class AccountResource +{ + + static PersonalInfoDAO personalDAO = new PersonalInfoDAOImpl(); + static PersonalInfo personalVO = new PersonalInfo(); + + public static void main( String[] args ) throws AccountValidationException, Exception + { + System.out.println( "Hello World!" ); + + personalDAO.addPersonalInfo(personalVO); + personalDAO.viewPersonalInfo(personalVO.getFirstName()); + personalDAO.modifyPersonalInfo(personalVO); + personalDAO.deletePersonalInfo(personalVO.getFirstName()); + + } + +} diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAO.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAO.java new file mode 100644 index 0000000..c740bab --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAO.java @@ -0,0 +1,17 @@ +package com.hibernate.rest.AccountHibernate.dao; + + +import com.hibernate.rest.AccountHibernate.validation.AccountValidationException; +import com.hibernate.rest.AccountHibernate.vo.PersonalInfo; + +public interface PersonalInfoDAO { + + void addPersonalInfo(PersonalInfo personalVOO) throws AccountValidationException, Exception; + + PersonalInfo viewPersonalInfo(String firstName) throws AccountValidationException, Exception; + + void modifyPersonalInfo(PersonalInfo personalVOO) throws AccountValidationException, Exception; + + void deletePersonalInfo(String firstName) throws AccountValidationException, Exception; + +} \ No newline at end of file diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAOImpl.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAOImpl.java new file mode 100644 index 0000000..b1c6136 --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAOImpl.java @@ -0,0 +1,103 @@ +package com.hibernate.rest.AccountHibernate.dao; + +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.springframework.stereotype.Repository; + +import com.hibernate.rest.AccountHibernate.util.HibernateUtil; +import com.hibernate.rest.AccountHibernate.validation.AccountValidation; +import com.hibernate.rest.AccountHibernate.validation.AccountValidationException; +import com.hibernate.rest.AccountHibernate.vo.PersonalInfo; + +@Repository +public class PersonalInfoDAOImpl implements PersonalInfoDAO { + + public PersonalInfoDAOImpl() { + super(); + } + + public void addPersonalInfo(PersonalInfo personalVOO) throws AccountValidationException, Exception { + + System.out.println("PersonalInfoDAOImpl : addPersonalInfo() : Start"); + Session session = HibernateUtil.getSessionFactory().openSession(); + StringBuffer allMessages = new StringBuffer(); + AccountValidation accValidate = new AccountValidation(); + System.out.println("Inside addPersonalInfoDAO : " + personalVOO.getFirstName()); + allMessages.append(accValidate.validatePersonalDetails(personalVOO.getFirstName(), personalVOO.getMiddleName(), + personalVOO.getLastName(), personalVOO.getGender())); + System.out.println("DAO Messages :" + allMessages.toString()); + if (allMessages.length() == 0) { + System.out.println("In DAO : " + personalVOO.getFirstName()); + Transaction tx = session.getTransaction(); + tx.begin(); + session.save(personalVOO); + System.out.println("PersonalInfoDAOImpl : addPersonalInfo() : End"); + tx.commit(); + session.close(); + } else { + throw new AccountValidationException(allMessages.toString()); + } + } + + public PersonalInfo viewPersonalInfo(String firstName) throws AccountValidationException, Exception { + + Session session = HibernateUtil.getSessionFactory().openSession(); + StringBuffer allMessages = new StringBuffer(); + AccountValidation accValidate = new AccountValidation(); + PersonalInfo personalVO = null; + System.out.println("Inside AccountDAO : " + firstName); + allMessages.append(accValidate.validateFirstName(firstName)); + System.out.println("DAO Messages :" + allMessages.toString()); + if (allMessages.length() == 0) { + System.out.println("In DAO : " + firstName); + personalVO = (PersonalInfo) session.load(PersonalInfo.class, firstName); + System.out.println(personalVO); + session.close(); + } else { + throw new AccountValidationException(allMessages.toString()); + } + return personalVO; + } + + public void modifyPersonalInfo(PersonalInfo personalVOO) throws AccountValidationException, Exception { + + Session session = HibernateUtil.getSessionFactory().openSession(); + StringBuffer allMessages = new StringBuffer(); + AccountValidation accValidate = new AccountValidation(); + System.out.println("Inside AccountDAO : " + personalVOO.getFirstName()); + allMessages.append(accValidate.validateFirstName(personalVOO.getFirstName())); + System.out.println("DAO Messages :" + allMessages.toString()); + if (allMessages.length() == 0) { + System.out.println("In DAO : " + personalVOO.getFirstName()); + Transaction tx = session.getTransaction(); + tx.begin(); + session.update(personalVOO); + tx.commit(); + session.close(); + } else { + throw new AccountValidationException(allMessages.toString()); + } + } + + public void deletePersonalInfo(String firstName) throws AccountValidationException, Exception { + + Session session = HibernateUtil.getSessionFactory().openSession(); + StringBuffer allMessages = new StringBuffer(); + AccountValidation accValidate = new AccountValidation(); + System.out.println("Inside AccountDAO : " + firstName); + allMessages.append(accValidate.validateFirstName(firstName)); + System.out.println("DAO Messages :" + allMessages.toString()); + if (allMessages.length() == 0) { + System.out.println("In DAO : " + firstName); + PersonalInfo personalVO = viewPersonalInfo(firstName); + Transaction tx = session.getTransaction(); + tx.begin(); + session.delete(personalVO); + tx.commit(); + session.close(); + } else { + throw new AccountValidationException(allMessages.toString()); + } + } + +} diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/interfaces/ErrorMsgCodes.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/interfaces/ErrorMsgCodes.java new file mode 100644 index 0000000..9a59bc4 --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/interfaces/ErrorMsgCodes.java @@ -0,0 +1,43 @@ +package com.hibernate.rest.AccountHibernate.interfaces; + +/* + * + * Error Message Codes + * + * */ +public interface ErrorMsgCodes { + + // Login Error Codes + String USER_ID_NULL = "UserName Required
"; + String PASSWORD_NULL = "Password Required
"; + public static final String USER_ID_INVALID = "Invalid UserName. for eg: Ab_2-1
"; + public static final String PWD_INVALID = "Invalid Password. for eg: He_34-llo@123
"; + + // Personal details Error Codes + public static final String FIRST_NAME_IS_BLANK = "First Name is blank
"; + public static final String FIRST_NAME_INVALID = "First Name must start with a letter. " + + "It can contain only letters, numbers, spaces, hyphens(-) and underscores(_).
"; + public static final String MIDDLE_NAME_IS_BLANK = "Middle Name is blank
"; + public static final String MIDDLE_NAME_INVALID = "Middle Name must start with a letter. " + + "It can contain only letters, numbers, spaces, hyphens(-) and underscores(_).
"; + public static final String LAST_NAME_IS_BLANK = "Last Name is blank
"; + public static final String LAST_NAME_INVALID = "Last Name must start with a letter. " + + "It can contain only letters, numbers, spaces, hyphens(-) and underscores(_).
"; + + // Contact details Error Codes + public static final String ADDRESS_IS_BLANK = "Address is blank
"; + public static final String CITY_IS_BLANK = "City is blank
"; + public static final String STATE_IS_BLANK = "State is blank
"; + public static final String COUNTRY_IS_BLANK = "Country is blank
"; + public static final String PHONE_IS_BLANK = "Phone Number is blank
"; + public static final String PERSON_ID_IS_BLANK = "First Name is blank
"; + public static final String PHONE_INVALID = "Please specify the phone number in the format (000-000-0000).
"; + + //Bank Details Error Codes + public static final String BANK_NAME_IS_BLANK = "Bank Name is blank
"; + public static final String ACCOUNT_NUMBER_IS_BLANK = "Account Number is blank
"; + public static final String SSN_IS_BLANK = "SSN is blank
"; + public static final String SSN_INVALID = "SSN should be in the format (000-00-0000).
"; + + public static final String HOME_PAGE = "/jsp/home.jsp"; +} diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/util/HibernateUtil.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/util/HibernateUtil.java new file mode 100644 index 0000000..7d886d8 --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/util/HibernateUtil.java @@ -0,0 +1,37 @@ +package com.hibernate.rest.AccountHibernate.util; + +import org.hibernate.SessionFactory; +import org.hibernate.cfg.Configuration; +import org.hibernate.service.ServiceRegistryBuilder; + +import com.hibernate.rest.AccountHibernate.vo.PersonalInfo; + +public class HibernateUtil { + + private static SessionFactory sessionFactory; + + private static Configuration config; + + // Create the initial SessionFactory from the default configuration files + static { + try { + config = new Configuration().configure().addAnnotatedClass(PersonalInfo.class); + /* + * .addAnnotatedClass(AccountVOO.class).addAnnotatedClass(ContactInfoVOO.class) + * .addAnnotatedClass(BankInfoVOO.class); + */ + + org.hibernate.service.ServiceRegistry serviceReg = new ServiceRegistryBuilder() + .applySettings(config.getProperties()).buildServiceRegistry(); + + sessionFactory = config.buildSessionFactory(serviceReg); + } catch (Throwable ex) { + throw new ExceptionInInitializerError(ex); + } + } + + public static SessionFactory getSessionFactory() { + return sessionFactory; + } + +} diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/validation/AccountValidation.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/validation/AccountValidation.java new file mode 100644 index 0000000..ea206c1 --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/validation/AccountValidation.java @@ -0,0 +1,150 @@ +package com.hibernate.rest.AccountHibernate.validation; + +import com.hibernate.rest.AccountHibernate.interfaces.ErrorMsgCodes; + +public class AccountValidation { + + public AccountValidation() { + super(); + } + + /* + * + * Login Validations + * + */ + public String validateUserName(String userName) { + System.out.println("Inside Account Validation UserName: " + userName); + if (userName.equals("")) { + return ErrorMsgCodes.USER_ID_NULL; + } else if (userName.trim().length() < 2) { + return ErrorMsgCodes.USER_ID_INVALID; + } else if (!(userName.matches("[a-zA-Z0-9@_ -]+"))) { + return ErrorMsgCodes.USER_ID_INVALID; + } + return ""; + } + + public String validatePassword(String passwd) { + System.out.println("Inside Account Validation Password: " + passwd); + if (passwd.equals("")) { + return ErrorMsgCodes.PASSWORD_NULL; + } else if (passwd.trim().length() < 2) { + return ErrorMsgCodes.USER_ID_INVALID; + } else if (!(passwd.matches("[a-zA-Z0-9@_ -]+"))) { + return ErrorMsgCodes.USER_ID_INVALID; + } + return ""; + } + + + public String validateFirstName(String firstName) { + System.out.println("Inside Account Validation FirstName: " + firstName); + if (firstName == null || firstName.trim().length() == 0) { + return ErrorMsgCodes.FIRST_NAME_IS_BLANK; + } else if (firstName.trim().length() < 2) { + return ErrorMsgCodes.FIRST_NAME_INVALID; + } else if (!(firstName.matches("^[A-Za-z][a-zA-Z0-9_ -]+"))) { + return ErrorMsgCodes.FIRST_NAME_INVALID; + } + return ""; + } + + /* + * + * Personal Details Validation + * + */ + + public String validatePersonalDetails(String firstName, String middleName, String lastName, String gender) { + System.out.println("Inside Account Validation Personal details : "); + if (firstName == null || firstName.trim().length() == 0) { + return ErrorMsgCodes.FIRST_NAME_IS_BLANK; + } else if (firstName.trim().length() < 2) { + return ErrorMsgCodes.FIRST_NAME_INVALID; + } else if (!(firstName.matches("^[A-Za-z][a-zA-Z0-9_ -]+"))) { + return ErrorMsgCodes.FIRST_NAME_INVALID; + } + + if (middleName == null || middleName.trim().length() == 0) { + return ErrorMsgCodes.MIDDLE_NAME_IS_BLANK; + } else if (!(middleName.matches("[a-zA-Z0-9_ -]+"))) { + return ErrorMsgCodes.MIDDLE_NAME_INVALID; + } + + if (lastName == null || lastName.trim().length() == 0) { + return ErrorMsgCodes.LAST_NAME_IS_BLANK; + } else if (lastName.trim().length() < 2) { + return ErrorMsgCodes.LAST_NAME_INVALID; + } else if (!(lastName.matches("^[A-Za-z][a-zA-Z0-9_ -]+"))) { + return ErrorMsgCodes.LAST_NAME_INVALID; + } + return ""; + } + + /* + * + * Contact Details Validation + * + * + */ + + public String validateContactDetails(String address, String city, String state, String country, String phone, + String personId) { + if (address == null || address.trim().length() == 0) { + return ErrorMsgCodes.ADDRESS_IS_BLANK; + } + + if (city == null || city.trim().length() == 0) { + return ErrorMsgCodes.CITY_IS_BLANK; + } + + if (state == null || state.trim().length() == 0) { + return ErrorMsgCodes.STATE_IS_BLANK; + } + + if (country == null || country.trim().length() == 0) { + return ErrorMsgCodes.COUNTRY_IS_BLANK; + } + + if (phone == null || phone.trim().length() == 0) { + return ErrorMsgCodes.PHONE_IS_BLANK; + } else if (phone.trim().length() < 10) { + return ErrorMsgCodes.PHONE_INVALID; + } else if (!(phone.matches("[0-9]{3}[-][0-9]{3}[-][0-9]{4}+"))) { + return ErrorMsgCodes.PHONE_INVALID; + } + + return ""; + } + + /* + * + * Bank Details Validation + * + * + */ + + public String validateBankDetails(String bank, String accNo, String ssn, String personId) { + if (bank == null || bank.trim().length() == 0) { + return ErrorMsgCodes.BANK_NAME_IS_BLANK; + } + + if (accNo == null || accNo.trim().length() == 0) { + return ErrorMsgCodes.ACCOUNT_NUMBER_IS_BLANK; + } + + if (personId == null || personId.trim().length() == 0) { + return ErrorMsgCodes.PERSON_ID_IS_BLANK; + } + + if (ssn == null || ssn.trim().length() == 0) { + return ErrorMsgCodes.SSN_IS_BLANK; + } else if (!(ssn.matches("[0-9]{3}[-][0-9]{2}[-][0-9]{4}+"))) { + return ErrorMsgCodes.SSN_INVALID; + } + + return ""; + } + +} diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/validation/AccountValidationException.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/validation/AccountValidationException.java new file mode 100644 index 0000000..7836dc7 --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/validation/AccountValidationException.java @@ -0,0 +1,32 @@ +package com.hibernate.rest.AccountHibernate.validation; + +/* + * + * User Defined Account Exception + * + * + */ + +public class AccountValidationException extends Exception { + + /** + * + */ + private static final long serialVersionUID = 1L; + private String errorMessage; + + public AccountValidationException(String errorMessage) { + this.errorMessage = errorMessage; + } + + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + + +} diff --git a/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/vo/PersonalInfo.java b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/vo/PersonalInfo.java new file mode 100644 index 0000000..17393db --- /dev/null +++ b/AccountHibernate/src/main/java/com/hibernate/rest/AccountHibernate/vo/PersonalInfo.java @@ -0,0 +1,69 @@ +package com.hibernate.rest.AccountHibernate.vo; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlRootElement; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@XmlRootElement +@Entity +@Table(name="personaldetails") +@JsonIgnoreProperties({"hibernateLazyInitializer","handler"}) +public class PersonalInfo { + + @Id + @Column(name="firstname") + private String firstName; + @Column(name="middlename") + private String middleName; + @Column(name="lastname") + private String lastName; + @Column(name="gender") + private String gender; + + public PersonalInfo(){ + super(); + } + + public PersonalInfo(String firstName, String middleName, String lastName, String gender) { + this.firstName = firstName; + this.middleName = middleName; + this.lastName = lastName; + this.gender = gender; + } + + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + public String getMiddleName() { + return middleName; + } + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + public String getLastName() { + return lastName; + } + public void setLastName(String lastName) { + this.lastName = lastName; + } + public String getGender() { + return gender; + } + public void setGender(String gender) { + this.gender = gender; + } + + @Override + public String toString() { + return "PersonalInfoVOO [firstName=" + firstName + ", middleName=" + middleName + ", lastName=" + lastName + + ", gender=" + gender + "]"; + } + +} diff --git a/AccountHibernate/src/main/java/hibernate.cfg.xml b/AccountHibernate/src/main/java/hibernate.cfg.xml new file mode 100644 index 0000000..32e0c04 --- /dev/null +++ b/AccountHibernate/src/main/java/hibernate.cfg.xml @@ -0,0 +1,13 @@ + + + + + com.mysql.jdbc.Driver + password + jdbc:mysql://localhost:3306/test + root + org.hibernate.dialect.MySQLDialect + + diff --git a/AccountHibernate/src/test/java/com/hibernate/rest/AccountHibernate/AppTest.java b/AccountHibernate/src/test/java/com/hibernate/rest/AccountHibernate/AppTest.java new file mode 100644 index 0000000..b477950 --- /dev/null +++ b/AccountHibernate/src/test/java/com/hibernate/rest/AccountHibernate/AppTest.java @@ -0,0 +1,20 @@ +package com.hibernate.rest.AccountHibernate; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/AccountHibernate/target/classes/META-INF/MANIFEST.MF b/AccountHibernate/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..771ca48 --- /dev/null +++ b/AccountHibernate/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: gargh +Build-Jdk: 1.8.0_231 +Created-By: Maven Integration for Eclipse + diff --git a/AccountHibernate/target/classes/META-INF/maven/com.hibernate.rest/AccountHibernate/pom.properties b/AccountHibernate/target/classes/META-INF/maven/com.hibernate.rest/AccountHibernate/pom.properties new file mode 100644 index 0000000..195859d --- /dev/null +++ b/AccountHibernate/target/classes/META-INF/maven/com.hibernate.rest/AccountHibernate/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Fri Apr 10 12:02:49 PDT 2020 +version=0.0.1-SNAPSHOT +groupId=com.hibernate.rest +m2e.projectName=AccountHibernate +m2e.projectLocation=C\:\\Users\\gargh\\eclipse-workspace-new-temp\\AccountHibernate +artifactId=AccountHibernate diff --git a/AccountHibernate/target/classes/META-INF/maven/com.hibernate.rest/AccountHibernate/pom.xml b/AccountHibernate/target/classes/META-INF/maven/com.hibernate.rest/AccountHibernate/pom.xml new file mode 100644 index 0000000..0163520 --- /dev/null +++ b/AccountHibernate/target/classes/META-INF/maven/com.hibernate.rest/AccountHibernate/pom.xml @@ -0,0 +1,88 @@ + + + + 4.0.0 + + com.hibernate.rest + AccountHibernate + 0.0.1-SNAPSHOT + + AccountHibernate + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + org.hibernate + hibernate-core + 4.1.1.Final + + + + mysql + mysql-connector-java + 5.1.34 + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/AccountResource.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/AccountResource.class new file mode 100644 index 0000000..f376cae Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/AccountResource.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAO.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAO.class new file mode 100644 index 0000000..08bf40c Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAO.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAOImpl.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAOImpl.class new file mode 100644 index 0000000..60e5518 Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/dao/PersonalInfoDAOImpl.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/interfaces/ErrorMsgCodes.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/interfaces/ErrorMsgCodes.class new file mode 100644 index 0000000..2a53a40 Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/interfaces/ErrorMsgCodes.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/util/HibernateUtil.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/util/HibernateUtil.class new file mode 100644 index 0000000..c0c3310 Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/util/HibernateUtil.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/validation/AccountValidation.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/validation/AccountValidation.class new file mode 100644 index 0000000..0610a0d Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/validation/AccountValidation.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/validation/AccountValidationException.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/validation/AccountValidationException.class new file mode 100644 index 0000000..8365689 Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/validation/AccountValidationException.class differ diff --git a/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/vo/PersonalInfo.class b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/vo/PersonalInfo.class new file mode 100644 index 0000000..f52bd0b Binary files /dev/null and b/AccountHibernate/target/classes/com/hibernate/rest/AccountHibernate/vo/PersonalInfo.class differ diff --git a/AccountHibernate/target/classes/hibernate.cfg.xml b/AccountHibernate/target/classes/hibernate.cfg.xml new file mode 100644 index 0000000..32e0c04 --- /dev/null +++ b/AccountHibernate/target/classes/hibernate.cfg.xml @@ -0,0 +1,13 @@ + + + + + com.mysql.jdbc.Driver + password + jdbc:mysql://localhost:3306/test + root + org.hibernate.dialect.MySQLDialect + + diff --git a/AccountHibernate/target/test-classes/com/hibernate/rest/AccountHibernate/AppTest.class b/AccountHibernate/target/test-classes/com/hibernate/rest/AccountHibernate/AppTest.class new file mode 100644 index 0000000..e7d429a Binary files /dev/null and b/AccountHibernate/target/test-classes/com/hibernate/rest/AccountHibernate/AppTest.class differ