Package com.savingcentschange.servicesCC.entities

Examples of com.savingcentschange.servicesCC.entities.UserAccount


  @Transactional(value = "transactionManagerMain", readOnly = false, rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
  public Response<?> addUserAccount(Map<String, Object> input) {
    LOGGER.info("Begin addUserAccount...");
    Response<String> response = new Response<String>();
    UserAccount userAccount = new UserAccount();
    try {
      FamilyMaster familyMaster = new FamilyMaster();
      List<FamilyMembers> listMembers = new ArrayList<FamilyMembers>();
      prepareMasterFamily(input, familyMaster);
      familyDao.addMasterFamily(familyMaster);
      String password = EncryptDecryptUtil.randomString(8);
      input.put(Constants.PASSWORD_USER_ACCOUNT, password);
      input.put(Constants.FAMILY_MASTER, familyMaster);
      prepareFamilyMembers(input, listMembers);
      FamilyMembers familyMember = listMembers.get(0);
      // FIXME: Provisionally the first element is familymember
      userAccount.setFamilyMember(familyMember);
      prepareUserAccoount(input, userAccount);
      familyDao.addMembersFamily(listMembers);
      userAccountDao.addUserAccount(userAccount);
      response.setT(password);
      response.setCodeExcute(Constants.OK);
View Full Code Here


  @Transactional(value = "transactionManagerMain", noRollbackFor = Exception.class)
  public Response<?> addCoUserAccount(Map<String, Object> input) {
    LOGGER.info("Begin addCoUserAccount...");
    Response<String> response = new Response<String>();
    UserAccount userAccount = new UserAccount();
    String passwordUserAccount = EncryptDecryptUtil.randomString(8);
    FamilyMembers member = familyDao.getFamilyMembers((Integer) input
        .get(Constants.ID_FAMILY_MEMBERS));
    userAccount.setFamilyMember(member);
    userAccount.setMailUserAccount(member.getMailFamilyMember());
    userAccount.setNameUserAccount(member.getFirstNameFamilyMember());
    userAccount
        .setSecondNameUserAccount(member.getSecondNameFamilyMember());
    userAccount.setPasswordUserAccount(passwordUserAccount);
    try {
      userAccountDao.addUserAccount(userAccount);
      response.setT(passwordUserAccount);
      response.setCodeExcute(Constants.OK);
    } catch (EncryptDecryptUtilException e) {
View Full Code Here

   private IBalanceDao balanceDao;
   @Test
  public void testBalanceOperations(){
     LOGGER.info("Begin testBalanceOperations..");
     List<Balance> listBalance = new ArrayList<Balance>();
     UserAccount userAccount = new UserAccount();
     userAccount.setIdtbCoreUserAccount(100000);
     listBalance.add(new Balance(
        1.00D,new Date(),userAccount));
     listBalance.add(new Balance(
        1.00D,new Date(),userAccount));
     balanceDao.addAll(listBalance);
View Full Code Here

   @Autowired
   private IUserAccountDao userAccountDao;
   @Test
  public void testUserAccountOperations() throws EncryptDecryptUtilException{
     LOGGER.info("Init testUserAccountOperations");
     UserAccount userAccount = new  UserAccount("Marcos","Alexis",
          "miPasswor", "chavo",
          "marcos.alexis.21@gmail.com");
     List< UserAccount> listUserAccount= new ArrayList<UserAccount>();
     listUserAccount.add(userAccount);
     userAccountDao.addAll(listUserAccount);
View Full Code Here

        .getResourceAsStream("data.properties"));
    LOGGER.info("Begin testEspensDao..");
    final String tokens[]={"type","value"};
    final String expens="expenses.";
    Date date = new Date();
    UserAccount userAccount = userAccountDao.getUserAccount(1000000);
    List<Expenses> list = new ArrayList<Expenses>();
    for(int i=1;i<18;i++){
      String propertie=expens+tokens[0]+"."+i;
      String value = properties.getProperty(propertie);
      Integer index = Integer.parseInt(value);
View Full Code Here

TOP

Related Classes of com.savingcentschange.servicesCC.entities.UserAccount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.